change from combo to text box (or label)

paulcraigdainty

Registered User.
Local time
Today, 09:46
Joined
Sep 25, 2004
Messages
74
I'm sure this one is out there but I just can't find it....

I have created my tables and selected a lookup from one table to another. The value displays ok however in a combo box. How can I change so the value is displayed in either a text box or better still as a label? I have right-clicked the combo box and selected ‘Change to’ text box however nothing is displayed, when I change it back to a combo it displays ok but in the drop down.
 
Thanks. So am i thinking correctly, I should implement the lookup on my form?

I have tried this however within the properties of a text box there is nowhere to enter a query. I just want to get the text box to show the value of a record in a different table
 
The lookup on a form is the job of a combo or list box. You set the Rowsource as the query for the values you can select and you bind the record source to the field you want the value save in.
 
Thanks Bob. I think maybe I need to look at doing this a different way. The problem is I don't want to use a listbox or combo box. I either want to use a text box or better still (though i don't think it's possible) a label. Basically I have a question table and I want to display the question to the user of the form. I was thinking the best way would be to use a text box and set it to transparent and locked so it looked like a label.

What would be the best way of displaying this record from my question table?

PS - My question table on has one record.

Thanks for your help.
 
I thought you were wanting to be able to select something. But, if you just want to display that one question then you could just set the controlsource of a text box to =DLookup("[YourQuestionField]","YourTableNameHere")

And then if you set the Enabled property to NO and the Locked Property to YES then no one can type in it and it won't be grayed out.
 
Thanks Bob. I think maybe I need to look at doing this a different way. The problem is I don't want to use a listbox or combo box. I either want to use a text box or better still (though i don't think it's possible) a label. Basically I have a question table and I want to display the question to the user of the form. I was thinking the best way would be to use a text box and set it to transparent and locked so it looked like a label.

What would be the best way of displaying this record from my question table?

PS - My question table on has one record.

Thanks for your help.
will it have more than one record? i hope so!!!

you might wanna try a dlookup
 
Hi

Thanks for the advice on using the DLOOKUP function.

I have tried implementing however I receive: #Error in the text box. Ihave entered the following into the control soure property of the text box:

=DLookUp(" [Q1]"," [tblQ1]")

I've tried an number of variations with no luck. Am I doing something wrong?
 
If your field name is Q1 and your table is named tblQ1 then it would be

=DLookUp("[Q1]","tblQ1")
 

Users who are viewing this thread

Back
Top Bottom