populate fields based on text entry

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

Guest

Hi,
I have a form where when the user needs to enter a code into a text field, I
want 2 other fields autopopulated based on that entry. I prefer a text box
to a combo box for this because within a year the combo box will have over
1000 records. I simply have not been able to find any info so far in my
"complete" reference book or online for this text boxes - most everything is
about populating with combos or list boxes. Can anyone point me in the right
direction? Can it be done at all?
 
1000 records is not too many for a combo box.
Are the "autopopulated" fields actually bound text boxes on your form? Are
you asking how to store values in one table that can be looked up in another
table? Normally this isn't good design since it causes redundant data
storage.
 
Hi,
I have a form where when the user needs to enter a code into a text field, I
want 2 other fields autopopulated based on that entry. I prefer a text box
to a combo box for this because within a year the combo box will have over
1000 records. I simply have not been able to find any info so far in my
"complete" reference book or online for this text boxes - most everything is
about populating with combos or list boxes. Can anyone point me in the right
direction? Can it be done at all?

That's because a combo box is most likely the correct control. 'Over
1000 records' is not a problem.

It probably could be done with a text control, but you have given no
real indication of what it is you actually want done. A few examples
would have been nice so that we don't have to guess.
 
Hi Duane,
Thanks for replying so quickly!
The problem I had with a combo box was that when moving to a new record, the
combo box choice from the last record remained and it became frustrating for
the person doing the data entry - who prefers to type the 4 digit code into
the text box. The 2 other fields that I wanted to autopoulate are found in
another table so I didn't need them bound - just for data entry display
purposes (and querying which can be done using that other table). Does that
help?
 
You can use code in the On Current event to set the combo box value to Null.
Add the 2 other fields to the Row Source of your combo box. Then add text
boxes with controlsources like:
=cboCode.Column(1)
=cboCode.Column(2)
 
Thanks, Duane, I'll give that a shot!

Duane Hookom said:
You can use code in the On Current event to set the combo box value to Null.
Add the 2 other fields to the Row Source of your combo box. Then add text
boxes with controlsources like:
=cboCode.Column(1)
=cboCode.Column(2)
 
Back
Top