coolcatkelso
Registered User.
- Local time
- Today, 10:08
- Joined
- Jan 5, 2009
- Messages
- 279
Hiya
I have my main form (Workorders by Customer) with a subform (Workorders by Customers Subform)
The subform is Datasheet style, In there is the Workorder ID taken from (Workorders) If you click on the workorder id in the subform, It should open up Schedule
The form Schedule has the following IDs
SchedID AutoNumber
WorkorderID Number
CustomerID Number
I'm trying to get it so when I click on the Subform workorderID, it opens up the schedule form and displays the information relating to that workorder.. But if there is no current record, then I want it to make one
Currently, if I click on the WorkorderID it is just showing as being filtered, but showing the same record for all
I have setup a Relationship based on WorkorderID
I am using a VBA to open the form. On the Main form with the subform etc on it, I have -
Docmd.OpenForm "Schedule",,,,acForm,,Me.WorkorderID
and on the actual Schedule form I have this set On Open
If Me.NewRecord Then
If Not IsNull(Me.OpenArgs) Then
Me.WorkorderID = Me.OpenArgs
End If
End If
Using the VBa script, I get the form to open but it won't filter out the WorkorderID.. Still showing same record for all
What am I missing?
Access 2007
Just an update
If I enter the workorderID into the Schedule page manually, it stores the information correctly.. Current setup is this - =[Forms]![Workorders by Customer]![Workorders by Customer Subform].[Form]![WorkorderID]
I'm using that to get the Schedule to lookup the workorderID from the Subform I click on. It is saving the info into the table for Schedule, but when I click to open it again, its like its adding a new record all the time?
But if I take the out and enter the ID myself, everything is fine??
________
IPAD ACCESSORIES
I have my main form (Workorders by Customer) with a subform (Workorders by Customers Subform)
The subform is Datasheet style, In there is the Workorder ID taken from (Workorders) If you click on the workorder id in the subform, It should open up Schedule
The form Schedule has the following IDs
SchedID AutoNumber
WorkorderID Number
CustomerID Number
I'm trying to get it so when I click on the Subform workorderID, it opens up the schedule form and displays the information relating to that workorder.. But if there is no current record, then I want it to make one
Currently, if I click on the WorkorderID it is just showing as being filtered, but showing the same record for all
I have setup a Relationship based on WorkorderID
I am using a VBA to open the form. On the Main form with the subform etc on it, I have -
Docmd.OpenForm "Schedule",,,,acForm,,Me.WorkorderID
and on the actual Schedule form I have this set On Open
If Me.NewRecord Then
If Not IsNull(Me.OpenArgs) Then
Me.WorkorderID = Me.OpenArgs
End If
End If
Using the VBa script, I get the form to open but it won't filter out the WorkorderID.. Still showing same record for all
What am I missing?
Access 2007
Just an update
If I enter the workorderID into the Schedule page manually, it stores the information correctly.. Current setup is this - =[Forms]![Workorders by Customer]![Workorders by Customer Subform].[Form]![WorkorderID]
I'm using that to get the Schedule to lookup the workorderID from the Subform I click on. It is saving the info into the table for Schedule, but when I click to open it again, its like its adding a new record all the time?
But if I take the out and enter the ID myself, everything is fine??
________
IPAD ACCESSORIES
Last edited: