tab entry vs. command button entry

D

Daniel M

I have a form that has text boxes and combo boxes bount to a table. If i add
my data and tab all the way through the form it enters the data into the
table. I would like to change this behavior to require a command button to
enter the data.

I know i can unbound the form data and do something like this...

Dim Rs As Recordset
Set Rs = CurrentDb.OpenRecordset("Assets")
Rs.AddNew

Rs![Dateentered] = Dateentered
Rs![EmployeeID] = Employees
Rs![SerialNumber] = SerialNumber
Rs![DepartmentID] = DepartmentID.Value

Rs.Update
Rs.Close
Set Rs = Nothing

The problem with this is there are about 30 items on the form to fill out.
Is there a better way of doing this or this the best way?

Thanks.
 
J

Jeanette Cunningham

Hi Daniel,
there may be a better way. It would help if you would explain what it is
about your current form that makes you want a command button to enter the
data.
In access there are many different ways to set up forms and enter data,
different ones work better in some situations than others.
What do you mean by 'a command button to enter data' ?



Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia
 
D

Daniel M

Changing the Cycle property is part of what i was looking for! Thanks.

Here is what i want on the form. Enter data, be able to tab through all
fields, click a command button to write the record. So far it all works ok.

the problem is if i fill out the form and close it before hitting the
command button to write the record all the data is written anyways. i assume
this is because the form fields are bound. is there anyway to stop this from
happening? I only want the command button to write the record.

dm.
 

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