Combo boxes for data entry

G

Guest

I have constructed a form to enter data into a table using combo boxes. The
data from the text boxes gets written to the table correctly but the data
from the combo boxes is written as a number rather than the text selected.
The combo boxes pick up their data from tables. I have checked that the
fields in the tables are both text but the data still gets written
incorrectly. Any ideas ?

Also, how to I get the data to get written as a new record rather than
overwriting the first record ? Is there anyway of protecting data so that it
doesnt get overwritten.

Thanks

Steve
 
J

John W. Vinson

On Thu, 14 Jun 2007 17:42:00 -0700, Steve Webber <Steve
I have constructed a form to enter data into a table using combo boxes. The
data from the text boxes gets written to the table correctly but the data
from the combo boxes is written as a number rather than the text selected.
The combo boxes pick up their data from tables. I have checked that the
fields in the tables are both text but the data still gets written
incorrectly. Any ideas ?

The data IS being entered correctly. That's how relational databases *WORK* -
you store, not the data itself, but a link to the data!

As a result, table datasheets tend not to be very readable. But that's not a
problem; the function of tables is to *store* data, not to display it. You can
display and interact with the data on a Form; you can create a Query joining
your main table to all your lookup tables to see the looked-up value on a
Report.
Also, how to I get the data to get written as a new record rather than
overwriting the first record ? Is there anyway of protecting data so that it
doesnt get overwritten.

Your form should take you to the new record when you leave the last field in
the current record. By default a form will have a navigation bar at the lower
left - the << < [ ] > >> *> buttons. The *> button will take you
to the new record. If you wish, you can set the Form's Data Entry property to
true; this will let you ONLY enter new data, and not even let you look at
(much less change) old data.

Take a look at the tables and the forms in the Northwind sample database to
see how this can be done.

John W. Vinson [MVP]
 
G

Guest

You need to check which column is the bound column in the combo box
properties. That is the data that will be stored in your field, not
necessarily the data you see if the column is hidden.

Hope this helps,
Jackie
 

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