G
Guest
Most times, when I use form a, I click on a command button which opens sub
form B as a front end to table B. table A has autonumber as a primary key
(unique) and table B has "number" as a pseudo-key (not unique but required ;
duplicates allowed) in a one to many relationship. Table B has recordtypename
as a field. Table B usually has 4 to 10 records related to each unique table
A entry. 95% of the time, I click on the command button, and create 6
records in table B: recordtypename A, recordtypename B,recordtypename C,
recordtypename D,recordtypename E,recordtypename F. This takes a few seconds
and is annoying because it is so predictably repititious. I want to handle
this work like a macro of sorts. When I click the commandbutton, I have some
underlying code in CODEBUILDER that says
create record one ,
SET recordtypename = A and leave the other fieldnames unpopulated,
create record two , SET recordtypename = B and leave the other fn
unpopulated, create record three , SET recordtypename = C and leave the other
fn unpopulated,
:
:
create record six , SET recordtypename = F and leave the other fn unpopulated
Then 5 % of the time, I could just delete the record I don't need.
I am not clear on how to write the code.
form B as a front end to table B. table A has autonumber as a primary key
(unique) and table B has "number" as a pseudo-key (not unique but required ;
duplicates allowed) in a one to many relationship. Table B has recordtypename
as a field. Table B usually has 4 to 10 records related to each unique table
A entry. 95% of the time, I click on the command button, and create 6
records in table B: recordtypename A, recordtypename B,recordtypename C,
recordtypename D,recordtypename E,recordtypename F. This takes a few seconds
and is annoying because it is so predictably repititious. I want to handle
this work like a macro of sorts. When I click the commandbutton, I have some
underlying code in CODEBUILDER that says
create record one ,
SET recordtypename = A and leave the other fieldnames unpopulated,
create record two , SET recordtypename = B and leave the other fn
unpopulated, create record three , SET recordtypename = C and leave the other
fn unpopulated,
:
:
create record six , SET recordtypename = F and leave the other fn unpopulated
Then 5 % of the time, I could just delete the record I don't need.
I am not clear on how to write the code.