Show us or not show

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello!

It would like solution for the next:
In form, when one combobox was filled, one textbox show us 1, if she (combo)
was empty, it show us B.

Thanks in advance.
an
 
I am a little unsure of your question, so I will try and rephrase, before
answering.

You are looking to have a textbox display one value, if the combo box is
empty (null) - such as before a value is selected; but want it to display
some associated value if a value is selected into the combo box.

If this is the case, try this:

iif(isnull([combo1]),<valueB>, dlookup("<fieldA>", "tblData1", "<fieldB> =
[combo1]"))

Something like this in the OnOpen event of the form, and the AfterUpdate
event of the combobox, should be able to accomplish what you are looking for.

HTH

Sharkbyte
 
Thanks fpr your reply.

For other words:
When we open the form, with combo and text box, the text box show us one
number, leter or symbol.

When we click in combo row, the text box value change to another number,
leter or symbol, Ok?

Many thanks.
an

Sharkbyte said:
I am a little unsure of your question, so I will try and rephrase, before
answering.

You are looking to have a textbox display one value, if the combo box is
empty (null) - such as before a value is selected; but want it to display
some associated value if a value is selected into the combo box.

If this is the case, try this:

iif(isnull([combo1]),<valueB>, dlookup("<fieldA>", "tblData1", "<fieldB> =
[combo1]"))

Something like this in the OnOpen event of the form, and the AfterUpdate
event of the combobox, should be able to accomplish what you are looking for.

HTH

Sharkbyte





an said:
Hello!

It would like solution for the next:
In form, when one combobox was filled, one textbox show us 1, if she (combo)
was empty, it show us B.

Thanks in advance.
an
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Empty a bound textbox (?) 12
Text boxes without data show us 2
Query Parameter using multiple options 0
3 chooses with same combobox (?) 2
Showing value of other table 5
MsgBox 2
Trim? 4
Combobox display question 5

Back
Top