Greetings,
I've been using this site for lots of access help in the past, and it's very helpful! I have a new complexity for you all.
Reworking a form [Products1] to record 70-80 years of oil production on multiple leases, which have multiple wells within them. Most wells can fit on one printed page (one record), but in the case of overspill, we want to do the following:
-Move to a new record and auto fill the LeaseName, LeaseNumber, Operator, etc. control fields
(So that any additional page still has the correct header from the previous record)
-Add 01 to the Page field from the previous record and 11 to the Page field for the current record (Page is stored as two digits, formatted '@" of "@' so that 11 displays "1 of 1")
For the Auto Filling, I have created a Macro called "NewPageRunoff" and its source is condition: [Forms]![Products1]![Production17]>1 (Production17 is the last record that fits on one printed page)
Action: RunCode AutoFillNewRecord ([Forms]![Products1]) (Pulls up the AutoFillNewRecord Module I got from Microsoft at http://support.microsoft.com/kb/210236/EN-US/)
- it is set to the "onCurrent" form property
The new text box the website instructs to create is called AutoFillNewRecordFields, and its Default Value is set to "LeaseNumber;LeaseName;Operator;Sec;Twp;Rang;Addre ss;USD;City;State;PostalCode;TownshipName;PrimaryA PI;Spuddate;Depth"
...This somehow doesn't work. Do I need to put the control fields I want to fill in brackets []? I tested it by entering a full record and filling the Production column up to the Production17 control field, and going to a new record. The new record comes up blank.
Is there a more efficient way to do what I want? Am I missing something in the controls I have?