Textbox filled from query

cunnie

Registered User.
Local time
Today, 06:03
Joined
Apr 11, 2002
Messages
24
I have a textbox that gets it value from a query. But when i load the form that textbox remains blank, even after click it. Then I noticed, if you right click on it and then click 'Remove filter/sort' the value is displayed.
Anyone know how I can get the value to appear automatically?
 
well, for now this'll do.
I put a button in the form with this code in the on_click event;

TXTbox.SetFocus
DoCmd.ShowAllRecords

(tried it in the form_load event but it didn't work)

If anyone comes up with a better solution post a reply
 
Check your form design properties. Possibly a rogue filter got saved at some point in your design process. I've had that happen before and gone through hours of wondering. Otherwise, your solution certainly works...

Also, your query only has one value, right?

[This message has been edited by David R (edited 04-29-2002).]
 
Yeah my query only gives one result;

But, turns out this is slightly more complicated than I had first imagined.
You see I have lots of textboxes on the same form, not all 'will' be filled with data, but all of them 'could be'.
How can I select a range of data to be used for the form, and then narrow this range down to individual values for each text box.

for more details;
http://www.economatics.co.uk/access/help.htm
 
Try a crosstab query. It will display the results in the fashion you want, most likely, although you'll have to enter them in a different way since Crosstab's are non-updateable.
 
see 'fill textboxes with a query' in query forum (turning out to be more of a query post this)
 

Users who are viewing this thread

Back
Top Bottom