xmeb
Technical User
- Jun 5, 2013
- 89
Hi:
I am using the following code to save several text boxes to my data table and the ones listed to my locations table. It works okay except that it creates one blank record every time it saves a record in the locations table.
Thanks,
xmeb
I am using the following code to save several text boxes to my data table and the ones listed to my locations table. It works okay except that it creates one blank record every time it saves a record in the locations table.
Code:
Private Sub DataEntryFormSubmitButton_Click()
myReply = MsgBox("Are you sure you want to save this record? You cannot edit data after you save it.", vbYesNo)
If myReply = vbYes Then
RunCommand acCmdSaveRecord
Set conn = CurrentProject.Connection
conn.Execute "INSERT INTO LocationsTable (PrimaryLocation) VALUES ('" & Me![Areas/Buildings/Places] & "');"
conn.Execute "INSERT INTO LocationsTable (PrimaryLocation) VALUES ('" & Me![Roads] & "');"
Me.Requery
End If
End Sub
Thanks,
xmeb