I’ve done this before with a query ( I think…I’m having a brain fart.) and I want to do it now with VBA code so users can do this themselves.
A user wants to add X number of records to a table. In doing this, the code will fill out 2 fields of information and leaving the rest of the fields blank. Field 1 is the name of a facility and field 2 is a location number at the facility. So the table looks kind of like this:
Field1 Field 2
Fac1 0001
Fac1 0002
Fac1 0003
Fac2 0001
Fac2 0002
Fac2 0003
etc…
I want to give the user a button so they can add X number of records to this table. And they would need a variable for Field1 and a range of values for Field 2 (like locations 2000 to 2100, adding a record for each facility/location combo).
I imagine I could use a For…Next loop or something like that but I thought there is a more efficient way to do it. Ideas?