Graham1894
Registered User.
- Local time
- Today, 10:54
- Joined
- Apr 1, 2016
- Messages
- 15
Hi, I hope someone can help because I can’t seem to make this work.
When a user needs to update a record but do not have the authorisation to make the changes my DB sends a task to their line manager for them to complete the task.
Currently, the line manager opens the task form which gives them the information of what needs to be done, they then close the task and go to the record to make the changes.
I’ve been ask if I can put a button on the task form that would take them to the record. The problem is it works across all the tables.
In the task table I put three columns, to pass what I thought would be all the information I would need, (txtForm, txtCode, recID) these are then hidden controls on the task form so the information is in the form.
TxtForm is the form that needs to open, i.e frmCustomerDetails or frmQuoteDetails
txtCode is the name of the primary key i.e CustomerID or QuoteID
recID is the ID number i.e 5 or 8
VBA Code used
TempVars!txtForm = Me.txtForm.value
TempVars!txtCode = Me.txtCode.value
TempVars!txtRecID = Me.recID.value
Call CloseAllForms
DoCmd.OpenForm TempVars!txtForm, acNormal, , " TempVars!txtCode = " & TempVars!rstRecID
TempVars.RemoveAll
I can’t get the where clause to work, any help would be appreciated.
Thanks
When a user needs to update a record but do not have the authorisation to make the changes my DB sends a task to their line manager for them to complete the task.
Currently, the line manager opens the task form which gives them the information of what needs to be done, they then close the task and go to the record to make the changes.
I’ve been ask if I can put a button on the task form that would take them to the record. The problem is it works across all the tables.
In the task table I put three columns, to pass what I thought would be all the information I would need, (txtForm, txtCode, recID) these are then hidden controls on the task form so the information is in the form.
TxtForm is the form that needs to open, i.e frmCustomerDetails or frmQuoteDetails
txtCode is the name of the primary key i.e CustomerID or QuoteID
recID is the ID number i.e 5 or 8
VBA Code used
TempVars!txtForm = Me.txtForm.value
TempVars!txtCode = Me.txtCode.value
TempVars!txtRecID = Me.recID.value
Call CloseAllForms
DoCmd.OpenForm TempVars!txtForm, acNormal, , " TempVars!txtCode = " & TempVars!rstRecID
TempVars.RemoveAll
I can’t get the where clause to work, any help would be appreciated.
Thanks