Bug in form or curruption????

G

Guest

Hi,
I have a database that started acting strange last week. It is a front end
2000 database with the data tables linked to another 2000 database. The
front end has a form that the users input data with. The student table has a
field for college, which was populated from a separate university table. I
used a combo box on the form to look up the value then input the data into
the student.college field. I had it set up to use a sql statement generated
when the combo box was added. This worked fine for a long time. Then a user
reported that there were numbers in the college field in the student table.
These numbers were the primary key values from the university table. The
only way I can get this to work now is to create a query now that looks at
the university table. When I delete the combo box and then re- add it the
primary key value is added, not the college name. When I create the combo
box, I tell it to use data from the university table, select the university
field, and tell it to populate the student table college field. The SQL
statement does a select on the primary key and college field in the
university table. I do not know why it is selecting the primary key, there
is no place that I tell it to use this field. I even created two new small
tables, a new form to populate the one table from the 2nd table, and the
behavour is the same. Even though I have gone through the setup on the combo
box and selected the one field to place the data into the other field on the
second table, it still insists on putting the primary key in instead of the
data. Like I said I was able to get around it by just creating a query to do
the same thing and the selecting this when I build the combo box. However,
there are several forms with several large tables that this behavour may
affect, and I am concerned to say the least. The main database sits on the
server, (a 2003 SBS) and the front end databases sit on the users
workstations, which all link back to the server. There is a mix of 2000 and
2003 Office programs on the workstations, with the default being the 2000
version. How can I troubleshoot this and verify no problems????
Thanks a WHOLE lot.
- Wayne
 
K

Ken Snell \(MVP\)

My initial reaction is that your combo box is bound to a field that has the
"lookup" feature activated on it.

For your combo box with the university information, post the SQL statement
of its Row Source; also post its Bound Column value.

Just curious... why wouldn't you want to store the primary key value in that
field? unless the primary key is not the ID of the university?
 
G

Guest

Hi,
Thanks for the info, I played around with the Lookup feature, it was set to
text and I changed it to combo box, then changed the bound column in the form
and it worked OK. I wonder how it got changed, or why it started behaving
differently???....hmmm
I store the college name in the field so they can run queries against it,
should this be handled in a different manor? I normally work on the
operating systems/networks side and only get involved when problems crop up.
I used to do a lot more with access, but that was 5 -6 years ago.
Thanks again
- Wayne
 
K

Ken Snell \(MVP\)

I apologize, but work has kept me busy and I haven't had chance to reply
yet... but I will.
 
K

Ken Snell \(MVP\)

I would assume that the college name is associated with a primary key value
that identifies the college, no? That is what you should use to do the
search queries. In a combo box, you can let the user select a name from the
list, but have the combo box's Bound Column be the column that contains the
CollegeID field. That is what you should use in the queries.
 

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