Save data on form to table

mhisma

Registered User.
Local time
Today, 22:25
Joined
Sep 20, 2007
Messages
28
Hi,
I am an beginner access user,
I have two table, they are AA table which has two field ( ex. Costumer ID and Costumer Name ), both displayed on a form called Costumer Form, costumer ID is displayed on a combo box, and costumer name on a text box. So when costumer ID combo box updated, the text box will display costumer name based on his/her ID
On Costumer Form I add two more text box that will be used to manually input costumer address and costumer remarks
How can I save all the four data to the other table, ex. BB table
Kindly need your help
 
Link the form on the table via RECORD SOURCE properties (form properties), put BB.
Link all 4 fields on the fields in the table via CONTROL SOURCE properties (field properties).
When you go on next record, or you close the form, the record will be saved.
 
thank you for the help,
I follow your advise, but unfortunately, I cant save any data to the BB

Pray me to explain my case

ex.table AA

CosID CosName
0891 Jack
0986 Arnie
0999 Mary

I put cos ID on the combo box named COSID in MEETING form (on the ROW SOURCE i write a query " SELECT AA.CosID from AA ORDER BY CosID")

to automatically display costumer name ( on a text box in the MEETING form) I use the code below

Private Sub COSID_AfterUpdate()
Dim source As String
source = "select * from AA "
source = source & " where CosID = '" & COSID & "'"

Form_PATT_RECORDS1.RecordSource = source
End Sub

All costumer will join me in a meeting and all their remarks will be inputted manually, so on the form I add another text box named "REMARKS" on the form

I want to save them the BB table so it will show data like below

CosID CosName Remarks
0891 Jack Stop Order
0986 Arnie Continue Order
0999 Mary Ask Dave for advice

Pray tell me what's wrong within my steps

I want to add a command button named SAVE button to save, what code I should write to automatically save data on MEETING form to BB table

A lot of thanks in advance
 
Look at "DemoSaveDataA2000.mdb".
Look at Tables, frmBB (VBA).
Look at RELATIONSHIPS.
Open frmBB and try to enter a new record.
You don't need a command button for save the record.
When you go to next record (new), or you close the form,
the record will be saved automatically.
 

Attachments

save data on form to table

thanks a lot, it works
looks like I made a mistake in writing code for retrieving costumer name data on text box

once again, many thanks for the assistance
 

Users who are viewing this thread

Back
Top Bottom