|
-
March 7th, 2003, 09:57 AM
#4
When specifying values in an INSERT statement, if the value is a string, you need to enclose it quotes. Also, if you are pulling values from a combobox, then you need to use the .text property to retrieve the text that is selected.
If fldRWUID is a string use quotes, if not - dont. I cant tell but your variable strBlah tells me its a string.
Try this:
Code:
Dim sSQL as string
sSQL = "INSERT INTO tblCampRegistrations (fldRWUID, fldRegionID, fldYear) " _
& "VALUES ('" & strBlah & "', " & cmbRegion.SelectedIndex + 1 _
& ", " & cmbYear.SelectedItem.Text & ")"
HTH,
Greg
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|