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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inserting Data From Form

Status
Not open for further replies.

jmeadows7

IS-IT--Management
Jun 13, 2001
148
US
I'm using Access 2002 and am trying to insert data into a table with a query. Several of the query recods refer to data contained on the form that invokes the query - such as location code - i.e.
[Forms]![frm100_Daily_Green_Input]![cbow100_Location]

I've done this for years in Access97, and now I can't seem to get it to work - or at least work consistently in Access 2002. Anyone have any ideas why the query is showing null values when I try to insert?

Oh yeah, I can write the query in code and everything works fine.

Thanks,


 
I use still Access 97, but I use a different trick for this:

I declare a Public variable for Criteria, after that I create a Public function returning the value of the global variable. In after update event procedure of the control I change the value of the variable to match the control. This could work (I hope)
 
hmm...sounds interesting, I'll give it a shot. I've used functions to send stuff to queries, but since the other method had always worked - it hadn't dawned on me to try this approach with criteria.

Take a few steps back and you can see the forest instead of just the bark on the tree you're looking at!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top