Using Table Fields to populate textboxes

  • Thread starter Thread starter d
  • Start date Start date
D

d

I need to pull information from several Tables based on their joined field.
I had bee doing it by using a query and a ComboBox, but as the amount of
fields grows past the 255 limit, I would like to pull the info straight from
the Tables. I used the following code to pull from the ComboBox:

Me!SL3ItemEdit1.Value = Me!WpnTypeEdit6.Column(4)

This worked great except for two things; I need to do this several hundred
times over the course of the program - so I need to write a For Next or a Do
While and change the to:
Me!SL3ItemEdit2.Value = Me!WpnTypeEdit6.Column(5)
Me!SL3ItemEdit3.Value = Me!WpnTypeEdit6.Column(6)

and so on. Also the code to pull from the table instead of the ComboBox.

Thanks for any help offered,
 
I can not make any sense out of your description of what you want to do, but
it sounds like you should reconsider your design.

A form in single form view is used to work with a single record of data at a
time, which may come from a single table or several, joined through a query.
In other words, a form is a graphical user interface used to work with the
data in the tables.

A single form with 255 fields on it would be very useful, aside from the
practical problems of cramming that many fields into a form.

If you are trying to display many table records with one form you should
look at either using datasheet view of your form or continuous forms.

Also, a combobox is something you use to let the program user select from a
list.

Ragnar
 
Suffering varying opinions as it may be.....but a combo box has as many uses
as a creative mind may find. I often us combo boxes to pull information from
a query/table to populate other fields in a form.
Also, practical programming sometimes must go outside the suggested norm. I
have built forms that contain hundreds of fields along with radio buttons,
command buttons, list boxes. Sometimes the business world is not practically
represented by somebodys pre-conceived ideas for programming limitations.
After all, they are "good programming" practices and standards but by no
means carved in stone rules.
On to your delima:
I find that I must use a recordset to achieve large updates or multiple
update queries. Update queries called from code is simpler that recordset
updating.
 
Back
Top