kermit5
11-30-2001, 01:45 PM
I would like a form to contain a value that will be used (and displayed) as a page number on a form. I am not sure the required code to start the set with number one and increment from there.
I have a form, [Opening] with a subform [Opening Items]. I want the page number on the [Opening] form for each set of records in [Opening Items].
Any Ideas?
Jack Cowley
12-01-2001, 06:35 AM
I do not understand what you are trying to do. A form only has one 'page'. The form can show many records but the form does not change 'pages'. Now you have a link between your Form and Subform and this, in a sense, is your 'page number'. CustomerID # 37 will be the same 'page number' for the records in both tables.
kermit5
12-03-2001, 06:53 AM
Here is an attempt at a schematic of what I am trying to do
Job Name
--->Opening Type (autonumber)
------->Frame Type 1
------->Frame Option 1
------->Door Type 1
------->Door Option 1
----------->Opening Number 100
----------->Opening Number 107
----------->Opening Number 115
.
---->Opening Type (autonumber)
------->Frame Type 1
------->Frame Option 3
------->Door Type 6
------->Door Option 4
----------->Opening Number 206
----------->Opening Number 211
etc.
.
[JobName] is specified in [Master Form]![JobName]. I then have a subform [Master Form]![Opening] which contains only an auto number used to group together the items that make up that opening (ie [FrameType], [DoorType], etc.) I then have another subform [Master Form]![Opening]![OpeningItems] where I specify the details of the items included in that opening. The first field of [OpeningItems] record is [Qty]. I then have a linked form [OpeningNumbers] to assign opening numbers where this OpeningItem set is used. For each [JobName] there will be multiple [Opening]s. The forms are in a replicated database which means the autonumbers are random. There are two reasons for wanting a [PageNumber] on the form:
...1. When I enter a value in [Master Form]![Opening]![OpeningItems]![Qty], I need to create a record in [Master Form]![Opening] assigning an autonumber to use as the linking value. I have been unsuccessful in automatically assigning this value so if I have a field [Master Form]![Opening]![PageNumber] that begins at 1 on the first "page", when this value is set, the corresponding record in [Master Form]![Opening] will be created.
...2. It gives me an easy user reference to each Opening set.
.
Does this clear up my question?
[This message has been edited by kermit5 (edited 12-03-2001).]