prmitchell
Registered User.
- Local time
- Tomorrow, 07:05
- Joined
- Jan 2, 2013
- Messages
- 58
Hi
I have two tables where one Client has many jobs - and I have a switchboard with a combo box showing the existing clients where the user selects a client and then opens a Jobs form to enter a new job (Add mode) and so the user types in the details of the job but naturally I want the job form to record the clientID (in the Jobs table).
So after the user enters a job name (first field in the jobs form) I have an event on AfterUpdate which is
[ClientID].Value = Forms!Menu![ClientID].Value
Forms![Jobs].Refresh
DoCmd.Save acForm, "jobs"
This works fine for me using 2010 - every time - but I give to a user who is using 2007 - and it doesn't work every time.
Do I need all three lines, do I need something else, doe I need something different? Can you do this for when the form opens rather than when the user types in a job name (AfterUpdate)?
alternatively I have tried using the where condition on opening a form, namely
"[ClientID]=" & "'" & [ClientID] & "'"
but this doesn't work for add data mode, or does it somehow?
Peter
I have two tables where one Client has many jobs - and I have a switchboard with a combo box showing the existing clients where the user selects a client and then opens a Jobs form to enter a new job (Add mode) and so the user types in the details of the job but naturally I want the job form to record the clientID (in the Jobs table).
So after the user enters a job name (first field in the jobs form) I have an event on AfterUpdate which is
[ClientID].Value = Forms!Menu![ClientID].Value
Forms![Jobs].Refresh
DoCmd.Save acForm, "jobs"
This works fine for me using 2010 - every time - but I give to a user who is using 2007 - and it doesn't work every time.
Do I need all three lines, do I need something else, doe I need something different? Can you do this for when the form opens rather than when the user types in a job name (AfterUpdate)?
alternatively I have tried using the where condition on opening a form, namely
"[ClientID]=" & "'" & [ClientID] & "'"
but this doesn't work for add data mode, or does it somehow?
Peter