sql as control source?

Matthew Snook

NW Salmon Database
Local time
Today, 12:56
Joined
Apr 19, 2001
Messages
133
Hello.

I have a form based on a table. I would like to have a text box control on the form which has as its source a sql statement. I have a valid sql statement - When used independently the sql generates an editable result. When I put the sql statement in the "Control Source" property of the text box control, the field simply displays "#Name?" instead of the data.

Thanks,

Matt
 
As you have discovered this does not work. What are you trying to do? If you are trying to look up something in another table take a look at the DLookup function or explain what you want to do...
 
Thanks, Jack.

I was trying to avoid a sub-sub form, and still have editable data. Would DLookup give me editable data? Apparently, if the form is based upon one table or query, the only way to edit data from another source is through the use of sub-forms? I've already implemented it that way since I wrote.

Is there a rule of thumb about the nesting of subforms in good project construction? I have been trying to avoid going any deeper than a subform, but I suppose if the structure is correct, the integrity will be preserved...

Matt
 

Users who are viewing this thread

Back
Top Bottom