Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

auto fill

Status
Not open for further replies.

newbee23

MIS
Jun 30, 2003
12
US
Does anyone know how to autofill a page. I want to select the request number and have the form auto fill a few items from that request number.
 
Are you looking to fill in records that fit that criteria or just fill some fields on the current record based on the selection?
 
i'd like to do it based on record number. For example, if someone chooses a record number it will fill in the other boxes in the form that go along w/that record number. Like the requestor the item number, and so on.
 
So are you auto-filling for them so that the same information will be filled in correctly on a new record with the same #?

Or are they adding/changing information on that existing record and you're just making the form go to that existing record?
 
Both actually. The user will fill out the items that are missing, but pull up the rqst # and have it autofill areas from that record and then input information that all will go into a new record.

Make sense?
 
I'm sorry, having a difficult time visualizing.

I'm trying to figure out whether to suggest:

a) form with record number and then subform for the rest of the fields. Then on your main form you could have a find combo box that when selecting the appropriate # could go to that record and they could finish filling out, and also choose to fill out a new record related to that number if need be
b) New record with combo to select record id. Within that combo box, have all the other fields set to 0" width. Then when the user selects, within VBA insert the column values into the forms fields

Would either of those work for you?
 
Do you need any more info on this? Or do you know how to do it?
 
Have a combo box that's recordsource is something like this (you can use the builder [...] to accomplish too)

SELECT recordno, field1, field2, field3, field4 from tblTableName

Then for the column widths, set them to 1",0",0",0"

Then on the AfterUpdate event of the combo box, do:

On error resume next 'in case of null
me.field1 = me.combobox.column(1)
me.field2 = me.combobox.column(2)
me.field3 = me.combobox.column(3)
(and so on)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top