Query does not work

tekno

Registered User.
Local time
Today, 03:18
Joined
Aug 12, 2002
Messages
15
I have written a simple query with one table that does not work. The first column is an asterisk and the second is the primary key of that table, using an expression referring to a pick list out of a form. When I am in the query design window and run the query it works. When I go to the pick list and click (to run the macro that does work from the macro design window) it returns a blank record in the form in the macro. Any Ideas?
 
Last edited:
>using an expression referring to a pick list out of a form<

The expression you use isn't working the way you expect it to.

Post your SQL statement.

RV
 
Thank RV for your response. Here is the SQL statement envolved.


SELECT tblClientData.ClientID, tblClientData.*
FROM tblClientData
WHERE (((tblClientData.ClientID)=[Forms]![frmHospitalSearch]![List54]))
WITH OWNERACCESS OPTION;
 
Can't see an obvious SQL error and it works in design mode. Ergo, there must be something wrong with your pick list. Set a breakpoint on the after Update of the pick list and see what value it is actually returning...
 
Actually I am using an BeforeUpdate line. Do you think that may be the problem? I will wait to hear before I change it or set a breakpoint.
 
For the purposes of this exercise, It would be better to set the breakpoint after the data has been updated.

What code are you running in the BeforeUpdate? Unless it cancels the update, it should have no bearing on this problem anyway...
 

Users who are viewing this thread

Back
Top Bottom