Full Version: Odd Dropdown Box Question
UtterAccess Forums > Microsoft® Access > Access Forms
IgawaKei29
So what I want is a Form with a drop down box and a text box. When the user selects the item from the dropdown box and clicks the button it populates the text box somewhat.
That I want to display in the text box is skeleton code and when the user selects the element from the dropdown box it fills in the rest of the code.
So I would have:
[code]
SELECT [BLANK], daily_compare.CARD, daily_compare.BLD_CARD, [BLANK], daily_compare.pct_chg
FROM daily_compare;
[\code]
The blanks would be filled in by the dropdown box.
I hope I am explaining correctly.
Daryl S
Assuming you want the [BLANK] filled in both times with the value from the drop-box, you would have code like this:
e.textbox = "SELECT [" & Me.cboBoxName & "], daily_compare.CARD, daily_compare.BLD_CARD, [" & Me.cboBoxName & "], daily_compare.pct_chg FROM daily_compare;"
- Daryl
trapperalexander
you want your SQL string to be displayed in the textbox?
But this in the control source for your textbox: (no need for a button to populate the textbox, it will automatically update when the combo box is filled in)
="SELECT " & nz([combo0],"") & ", daily_compare.CARD, daily_compare.BLD_CARD, " & nz([combo0],"") & " , daily_compare.pct_chg" & Chr(13) & Chr(10) & "FROM daily_compare;"
IgawaKei29
Thanks appreciate both your help on this
Daryl S
br />rapper and I are happy to help!
missinglinq
And 'yes' the question is definitely 'odd!' iconfused.gif
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.