Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Shift" open generates diff. results in the forms 1

Status
Not open for further replies.

a80420

Programmer
Mar 13, 2007
3
US
Hi,

I'm currently working on some tweaks/upgrades to a current Access database. Basically, there's a form that displays some general information about the various customers that we do business with. The record source of the form is a very simple query
Code:
Select tbl1.*, tbl2.field1, tbl2.field2 from tbl1 INNER JOIN tbl2 ON ... WHERE id = ...
The query works fine, that's not my problem. I added "tbl2.field2" into the record source query and I wanted to display that field on the form. So, I added a textbox with the control source pointed to "tbl2.field2". At this point, I thought I was complete... What I can't figure out now is during my testing stage, I noticed that when I open Access with SHIFT and I manually open the form, the new textbox field will display the correct information from tbl2.field2....
What is really bugging me is when I open Access normally, without SHIFT... the form is set to open on startup... and at this point, the textbox shows "#NAME?" instead of the real value that the query is pulling from "tbl2.field2".
All the other fields works fine, but it's only the one textbox that I added that shows "#NAME?" .... DOES ANYONE KNOW WHY????? I would love some help ... i've been stuck at this point for a few days now and I really need to finish this project ASAP...

thanks
 
I would guess that code is running in a start up that changes the record source. Have you checked for autoexec macros and startup forms, or searched the code for the name of this form?
 
you know..
that didn't seem like an obvious answer until I read it from your posting.
There was an "IF" condition in the autoexec code, which was changing the record source...

Thanks for the insight... saved me lots of time trying to figure out the obvious
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top