Add new record with txtboxes and cboBox

SeBasTiaan

Registered User.
Local time
Today, 19:49
Joined
Jun 7, 2005
Messages
24
Hello, this might be easy but I just don't know how to do it. I have 1 combobox and several txtboxes and I want the data from these into a new record by pressing a button.

For example:
Combobox: Name1
txtBox1: Adress
txtbox2: City

Button: get data from fields and put in table.

table: Autonumber - Name1 - Adress - City

Thnx! SeBasTiaan
 
Not duplicate

Only the data from the combobox excists, but I just want to take the selected value from the combobox and the values from the textboxes and put them in a different table than where I got the data from the combobox. (is that stil clear ???? :) )
 
If your textbox controls display "unbound" in design view then you may want to bind them and let Access handle all this for you. Search VBA help for the ControlSource property of a control, and the RecordSource property of a form.
Or do you need to have them unbound for a reason?
 
Unbound

They show unbound... I still don't exactly know what bound and unbound means in Access.
I've made an attendance db for a school and this is what I want to do:

first combo selects a class from tblClass.
next combo selects a student from tblStudent where Class = cboClas (this works fine)

next the txtDate, txtReason should be stored in a new table, tbleAttendance with the ID of the student (cboStudent).
This must be undernead a button "add attendance".

Tnx again!
 

Users who are viewing this thread

Back
Top Bottom