If the purpose of the routine is to save the record then you may consider this popular code:
If Me.Dirty Then
Me.Dirty = False
End If
Hope that helps
Liveson
From: AccessDevelopers@yahoogroups.com [mailto:AccessDevelopers@yahoogroups.com] On Behalf Of leebasmith
Sent: Monday, 24 October, 2011 9:44 AM
To: AccessDevelopers@yahoogroups.com
Subject: [AccessDevelopers] Access 2010 Lending Library application
I am building the library Application from "Pro Access 2010 Development" book.
I have a checkOUt form that has a checkout button that if availble will lend out the book. For some reason it is not working. Here is the code:
Private Sub CheckOut_Click()
'Go to a new record
DoCmd.GoToRecord acDataForm, "CheckOut", acNewRec
CustomerID = txtCustomerID
InventoryItemID = txtInventoryItemID
'Cause the focus to move off the current record, which
'will cause it to be saved
DoCmd.GoToRecord acDataForm, "CheckOut", acNext // Here is where it gets stuck
DoCmd.GoToRecord acDataForm, "CheckOut", acLast
'Reset the form controls
txtInventoryItemID = ""
DoCmd.Requery "InventoryItemLookup"
InventoryItemLookup.Visible = False
CheckOut.Visible = False
End Sub
Can anyone Help.
Thanks
Leeba
Please zip all files prior to uploading to Files section.
Tidak ada komentar:
Posting Komentar