Query to insert data from form into table

acwest

Registered User.
Local time
Yesterday, 18:15
Joined
Mar 5, 2011
Messages
11
Hi,

I am trying to create a simple library which allows issueing, returning and reserving loans. So far i have been able to do issueing and returning.

However how would i go about making a query so that when a user opens the reservations form there will be two list boxes, one full of customers and one full of CDs to loan.

I have made a form with all this but how would i make the query select the two items from this form and insert them into the reservations table.

I have attached the slim downed database.

Thank you very much for any help.
 

Attachments

Your form needs to have a record source of "reservations". Then just create a button, in the on click code put
Code:
[catalogue number]=list3.catno
[Borrower ID]=list7.borrowerid
....
RunCommand accmdsaverecord
....other code here, move to new record, close form, etc.
Also you should name your controls as something a bit more memorable, like Borrower_Listbox, Catalogue_Listbox etc.
 
Hi thanks for the quick reply.

However is there anyway of doing this via a query, cause i cant use any VB code
 
You could make the button execute an update query, but to move to the next record or close the form you'll still need to use VBA. What's holding you up?
 

Users who are viewing this thread

Back
Top Bottom