Writing data to table from form.

R

Robert L.

Is it possible using VB to write data as a new record to a table from fields
selected in a form, say transferring the variable information to the table?
 
A

Allen Browne

Robert L. said:
Is it possible using VB to write data as a new record to a table from
fields
selected in a form, say transferring the variable information to the
table?

You don't need VB to do this. Just set the RecordSource property of the form
to hte name of the table where the data should be stored. Each text box has
a Control Source where you put the name of the field where that data goes.
That's it.

It is possible to use an unbound form, and write code to execute an action
query to append a new record (or edit an existing one, or delete a record.)
But you then lose the benefit of the rapid-development interface in Access,
where bound controls automatically check the data types, limit the length of
text, apply the validation rules, and so on.
 
A

Allen Browne

Robert L. said:
Is it possible using VB to write data as a new record to a table from
fields
selected in a form, say transferring the variable information to the
table?

You don't need VB to do this. Just set the RecordSource property of the form
to hte name of the table where the data should be stored. Each text box has
a Control Source where you put the name of the field where that data goes.
That's it.

It is possible to use an unbound form, and write code to execute an action
query to append a new record (or edit an existing one, or delete a record.)
But you then lose the benefit of the rapid-development interface in Access,
where bound controls automatically check the data types, limit the length of
text, apply the validation rules, and so on.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top