2 Replies - 552 Views - Last Post: 19 January 2012 - 08:43 PM Rate Topic: -----

#1 levin  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 24
  • Joined: 08-February 11

Syntax error in string inquery expression

Posted 19 January 2012 - 09:28 AM

If rs.RecordCount = 1 Then
Unload Me
            If rs.Fields("Voted") = False Then
                con.Execute "update [Voters] set [Voted] = True where [VoterID]='" & Chr(32) & frmBallot.txtstud.Text & Chr(32)
                frmBallot.txtstud.Text = Me.txtuser.Text
                frmBallot.Caption = rs.Fields("Firstname") & "  " & rs.Fields("Lastname")
                frmBallot.Show
                Unload Me
                
            Else
                MsgBox "You voted already!", vbOKOnly + vbCritical, "CVS"
'                Me.txtpass.SetFocus
                Me.txtuser.Text = ""
                Me.txtpass.Text = ""
            End If

Attached image(s)

  • Attached Image
  • Attached Image


Is This A Good Question/Topic? 0
  • +

Replies To: Syntax error in string inquery expression

#2 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5571
  • View blog
  • Posts: 11,908
  • Joined: 02-June 10

Re: Syntax error in string inquery expression

Posted 19 January 2012 - 11:46 AM

Wow.. Two screen shots.
No explanation. Nothing.

There are database tutorials in the tutorials section, you should give them a try.

See FAQ 19

TOP most asked:
What does this error message mean?
FAQ 2: How do I debug
FAQ 3: How do I make Form1 talk to Form2



FAQ (Frequently Asked Questions - Updated Jan 2012

Spoiler

Was This Post Helpful? 0
  • +
  • -

#3 BobRodes  Icon User is offline

  • Your Friendly Local Curmudgeon
  • member icon

Reputation: 574
  • View blog
  • Posts: 2,989
  • Joined: 19-May 09

Re: Syntax error in string inquery expression

Posted 19 January 2012 - 08:43 PM

Not to mention he posted another bit of code with the same problem. levin, get your code working in your db first, then work on putting it into VB.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1