Weird numbers in text boxes on opening form

M

mitenko

Hi All,

I've built a (fairly) standard staff db and form for an organisation.
At home it seemed to work fine. When I went to install it on their
computers and demo, though, opening the form showed a record with all
the same number value in the text boxes. I think this is the primary
key, since in the next record all the text boxes showed "(AutoNumber)".

Neat, huh? Flipping between design and form view corrects the problem,
but perhaps there's a better way to fix this?

Cheers,
David Mitenko
IT Support Officer
VSO Nepal
http://mitenko.blogspot.com
 
T

TC

"Autonumber" means: "this is a new record, and this is an Autnumber
field, and I will fill in the next available autonumber in this field
for you, as soon as you start typing data into this new record".

You can't have several autonumber fields in one table. So it sounds
like your form is based on a query which joins several tables, each of
which has an autonumber field.

IOW, "works as designed", no? I imagine it does just the same thing on
your computer at home.

HTH,
TC (MVP Access)
http://tc2.atspace.com
 
R

Ron2005

Or perhaps we should say it would IF all the tables were empty
when you tried it at home just like when you demo it.
 
M

mitenko

Perhaps I should clarify:

When opening this form, all of the textboxes that are normally bound to
various table fields, ie FirstName, LastName, Education, etc, show a
number (all the same number) instead of the actual data that's in this
record. Skipping to the last record, all of the textboxes now show
"{AutoNumber}". These are NOT AutoNumber/PK fields, they just have
suddenly decided to act like they are.

The form is derived from a table (with some subforms attached).

It actually does work at home. In fact on most computers I've opened it
on. Even when I delete all the records in the table.

I'm assuming this is some minor bug due to incompatibility with dif't
Access versions and perhaps someone has come across this before. Like I
said, flipping between design and form view corrects the problem (all
the textboxes recover their FirstName, LastName text values), but
perhaps there's an easier way to fix this?

David Mitenko
IT Support Officer
VSO Nepal
http://mitenko.blogspot.com
 
T

TC

That would not be a "minor bug"! It would be a catastrophic error in
the operation of a bound form. There's no way that a bound form should
ever display incorrect values, ie., values that *do not* exist in any
record of the datasource to which the form is bound.

Is the form bound to a table, or a query, or a SELECT statement? If
either of the latter two, what's the relevant SQL?

TC (MVP Access)
http://tc2.atspace.com
 

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