473,386 Members | 1,830 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

New Record Auto Fill as Previous Record Runoff?

16
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?
Oct 16 '06 #1
0 2671

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: SalimShahzad | last post by:
dear gurus, can any one help me to how to store progrmatically last value in combo box. say i load access form. but in combo box the last value how it will come any ideas...as i need only...
1
by: kufre | last post by:
I need some help. How can I automatically fill my combo box in a new record with data from previous similar record. My form has a option group button with two check box. What I'm trying to do is...
0
by: pbartel | last post by:
I want to auto fill a feild from a previous record. Pressing f8 does the trick but I want to automate it?
1
by: Brian | last post by:
Hey all - I have a windows form (using VB) in which I display basic information about a person, all of which is housed (for now) in a single Access table, which I'll call "tblPerson". I would...
3
by: pjcraig | last post by:
This is driving me crazy! I have a form that a user will access from another form by selecting the item that they wish to view. When they open the new form, I pass through the id of the item they...
7
by: Dale Sampson | last post by:
As you can tell, I am new to VS.net. I have a VB project with a defined data source pointing to a table in a ..mdb file.-- The associated fields are displayed in textboxes using the...
3
by: liquid | last post by:
Microsoft Access I am a newbee, so this may be a stupid question, but I will ask anyway. I have a form "Month1" and a linked subform "Monthlystuff" linked by a textfield "Month" and I placed in...
8
by: Jeff | last post by:
A client wants a press of the Enter key in a field on a continuous form to grab the value of that field from the previous record. But if they have typed a value and then hit Enter it shouldn't. ...
2
by: Bobby Edward | last post by:
I am using VS 2008 SP1, ASP.NET 3.5, VB.NET, MySQL (latest version). I created a new dataset using VS. In the ds I have a users table. I let it create the "Fill, GetData" functions in the...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.