Leeba-
Please describe what you mean by "stuck." Do you get an error? If so, what?
Where are txtCustomerID and txtInventoryItemID defined? Maybe you're not
setting any values. And instead of the two GoToRecord commands to save the
record, replace them with:
RunCommand acCmdSaveRecord
That should do the save and leave you on the record.
John Viescas, author
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)
-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of leebasmith
Sent: Monday, October 24, 2011 9:44 AM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] 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
------------------------------------
Yahoo! Groups Links
Senin, 24 Oktober 2011
RE: [MS_AccessPros] Access 2010 Lending Library application
__._,_.___
MARKETPLACE
.
__,_._,___
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar