Combo Box or Text Box

  • Thread starter Thread starter Alan F
  • Start date Start date
A

Alan F

Hi,

I have set up a text box on a form so that when I enter a number into it the
form displays the data for that record. I have done this using a macro.
If I try to convert this to VB by using access conversion option then it
does not work. Is there any sample code that I could adapt. I would rather
not use a combo box because I do not want the drop down arrow available and
have been unable to find a way for it not to be displayed.
Thanks in advance for any help given.
 
In the textbox's AfterUpdate eventhandler, put code similar
to the following

DoCmd.ApplyFilter , "{columnName} = " & {textboxName}

You will have to change {columnName} and {textBoxName}
including the {}

Hope This Helps
Gerald Stanley MCSD
 
Alan F said:
Hi,

I have set up a text box on a form so that when I enter a number into it the
form displays the data for that record. I have done this using a macro.
If I try to convert this to VB by using access conversion option then it
does not work. Is there any sample code that I could adapt. I would rather
not use a combo box because I do not want the drop down arrow available and
have been unable to find a way for it not to be displayed.
Thanks in advance for any help given.

Be lazy.
Create the combo box to move to a record based on the result.
Copy the code from the event.
Paste it into your text box.

Real lazy however requires the combobox to save having to type the whole
number in.
 
Back
Top