By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,793 Members | 1,488 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,793 IT Pros & Developers. It's quick & easy.

Ticked on another table

P: 2
Hi, Im beginner in Access and I got problem with my form.

My form (frmRegistration)
-save all the data key in by the user to the table Registration
-also need to tick the Register field at table Room when clicked the button save

My problem is all the data can be saved successful but I dont know how to tick the Register field which is at the other table.

This is my tables:
Registration(RegistrationID,CustomerID,RoomID,Star tDate,EndDate)
Room(RoomID,RoomNo,BlockID,TypeID,PriceID,Register ,Notes)

Im really newbie in Access and need help. Anyone, please teach me well.
Thank you.
May 25 '07 #1
Share this Question
Share on Google+
2 Replies

MMcCarthy
Expert Mod 10K+
P: 14,534
You need something like the following code.
Expand|Select|Wrap|Line Numbers
  1. Dim strSQL As String
  2.  
  3.    strSQL = "UPDATE Room Set Register = True WHERE RoomID=" & Me!RoomID
  4.    DoCmd.RunSQL strSQL
  5.  
May 26 '07 #2

P: 2
You need something like the following code.
Expand|Select|Wrap|Line Numbers
  1. Dim strSQL As String
  2.  
  3.    strSQL = "UPDATE Room Set Register = True WHERE RoomID=" & Me!RoomID
  4.    DoCmd.RunSQL strSQL
  5.  
Thanks for the reply. Where can I put those code. Is it in the save button or After Update event? And with the code, did I need to add the checkbox in the form?
May 28 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.