I'd like to pull values from a table to a textbox on a form. I use SQL SELECT statements with comboboxes all the time. There is no Row Source attribute for a textbox.
textbox = value where value can be a dlookup from the table that stores the data or you can use a literal or the column(index) property . Place the express on the forms on current or if the value depends on data entered in another textbox place it on the OnExit event of that textbox.
I have a form called frm_Month and a subform called subfrm_LateFee - linked on the column Month. There are two columns, FirstName and LastName, which do not reside in either one of the base tables that correspond to the two forms mentioned above.
Can I use a SQL query to pull those two columns out of tbl_Staff (the third, unrelated table) and concatenate them into an unbound textbox on the subform? I can write the SQL, but I don't have a clue how to implement it! I'm not a VBA whiz.
Your help is greatly appreciated, and maybe, it won't even require VBA coding!
is this the same way I would fill a value of a textbox in a continuous subform?
I use a combobox to select the company on the main form, but want to fill all new records of the subform with the same company ID selected in the main form.
One way to get the data into the textbox is to get it from another form object by referring to the object in the text box 'control source' field. I.e. '=[Forms]![frm_any-open-form]![cbo_any-combo-or-listbox]'
I use listboxes sometimes. A listbox looks like a textbox and can use SQL queries in the row source field.
Do you know how to tie a textbox to a query? The info I'm trying to pull into the textbox is directly from a table. It's not from an open form. Unfortunately, the table is not bound to the form or subform in question.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.