lfazenbaker
New member
- Local time
- Yesterday, 22:10
- Joined
- Sep 16, 2005
- Messages
- 7
Can someone please tell me what I'm doing wrong here. I have just added a record to a table. I would now like to get the record number (FamilyID), which as an AutoNumber field, and pass it to another form. My query is giving me an error that says,
"A RunSQL action requires an argument consisting of an SQL statement."
Here is the code snippet:
DoCmd.RunSQL "SELECT FamilyID FROM Families WHERE LastName = '" & _
txtLast.Value & "';"
Thanks,
Lisa
P.S. No one ever replies to my posts. Please respond if you can help.
"A RunSQL action requires an argument consisting of an SQL statement."
Here is the code snippet:
DoCmd.RunSQL "SELECT FamilyID FROM Families WHERE LastName = '" & _
txtLast.Value & "';"
Thanks,
Lisa
P.S. No one ever replies to my posts. Please respond if you can help.