Help! Bug in combo box query

G

Guest

I have the two combo boxes where the first one (cbo1) has a rowsource of a lookup table, the second combo box(cbo2) has row source created in the query builder but looks like this
Form name is frm1

SELECT tblCharacteristicsMaster.BS_Type FROM
tblCharacteristicsMaster WHERE (((tblSawCharacteristicsMaster.Mill_ID)
=Forms![frmfrm1]!Mill_ID));

BS_Type is the information needed in cbo2
mill_ID is the info for cbo1

Here is the kicker, everything works great in my logic, it actually works fine after I save it and run it, but as soon as I close the form and open it up again it the logic changes to this:

SELECT tblCharacteristicsMaster.BS_Type FROM
tblCharacteristicsMaster WHERE (((tblSawCharacteristicsMaster.Mill_ID)
=Forms![frmBench]!Mill_ID));

The =Forms![frmBench]!Mill_ID));
changes everytime. It changes the name of the form for some reason, but not the actually name just the query info name.

If anyone has any idea why this might do it and how to fix it or just a better way to do it, please let me know. Thank you in advance.
Steve
 
T

tina

hmmm, that sounds pretty strange. on the menu bar, go to Tools, Options,
General tab. on the right side of the dialog box, is there a checkmark in
the box next to "Track name AutoCorrect info"? if yes, remove the checkmark,
click the Apply button, then the Ok button. then perhaps close the db,
compact it and reopen it.
that *might* fix the problem - Name AutoCorrect has some pretty weird
effects and you usually see advice to turn it off, here in the newsgroups.

hth


Steve said:
I have the two combo boxes where the first one (cbo1) has a rowsource of a
lookup table, the second combo box(cbo2) has row source created in the query
builder but looks like this
Form name is frm1

SELECT tblCharacteristicsMaster.BS_Type FROM
tblCharacteristicsMaster WHERE (((tblSawCharacteristicsMaster.Mill_ID)
=Forms![frmfrm1]!Mill_ID));

BS_Type is the information needed in cbo2
mill_ID is the info for cbo1

Here is the kicker, everything works great in my logic, it actually works
fine after I save it and run it, but as soon as I close the form and open it
up again it the logic changes to this:
SELECT tblCharacteristicsMaster.BS_Type FROM
tblCharacteristicsMaster WHERE (((tblSawCharacteristicsMaster.Mill_ID)
=Forms![frmBench]!Mill_ID));

The =Forms![frmBench]!Mill_ID));
changes everytime. It changes the name of the form for some reason, but
not the actually name just the query info name.
If anyone has any idea why this might do it and how to fix it or just a
better way to do it, please let me know. Thank you in advance.
 

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