Use a form and subform - Project/Subprojects.
Query for form --
SELECT YourTable.*
FROM YourTable
WHERE Len([Project Number]) = 4;
Query for form --
SELECT YourTable.*, Left([Project Number], 4) AS ProjNum, Right([Project
Number], 2) AS SubProj
FROM YourTable
WHERE Len([Project Number]) > 4;
In the main form set the Master/Child links on [Project Number] to SubProj
of the subform.
Include [Project Number] in the subform but set visible property to No.
In the Subform field SubProj have AfterUpdate call macro that SetValue of
[Forms]![YourFormName]![SubFormName]![Project Number] =
[Forms]![YourFormName]![Project Number] & "." &
[Forms]![YourFormName]![SubFormName]![SubProj]
To add a subproject type in the 2 digits and press ENTER. The macro will
concatenate the Project Number from the main form with a period and the 2
digits to create the complete Project Number with subproject.
--
Build a little, test a little.
jammatmil said:
That's a great question. Right now there is only one table, and I'd like to
keep it that way if possible.
Heres an example:
----------------------
Project Number: 0004
Project Title: Training Ranges
[then there would be more info]
----------------------
0004.01 Rifle Range
0004.02 Pistol Range
----------------------
It's hard to explain how I want this to work and may be too complex for this
forum. I think I can get away with just adding a few fields to the bottom of
the form but I would like it to be a little more dynamic.
KARL DEWEY said:
Got to know something about the tables tied to the forms. Do you have
projects in one table and subprojects in another? Or do you have bothe in
the same table?
What are the table and field names and the datatypes?
Post some sample data.