Hi,
I have 2 forms ('client' & 'review'). Both forms are based on seperate tables however both have a field 'policy' which links the two.
When I click on a button ('addreview') on the client form I need this to open a new record on the review form. I also need the field 'policy' to be set to the value which was in 'policy' in the 'client' form.
So far this is the code I have;
Private Sub addreview_Click()
DoCmd.OpenForm ("review"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
DoCmd.GoToRecord acDataForm, "review", acNewRec
DoCmd.Close acForm, "client"
End Sub
This opens the new form & goes to a new record however I'm having trouble setting the 'policy' field based on data in the 'client' form.
I'm wondering if I should use a public variable to transfer data from one form to the other however I haven't had much success with this.
Any help\guidance would be appreciated.
Grieg.
I have 2 forms ('client' & 'review'). Both forms are based on seperate tables however both have a field 'policy' which links the two.
When I click on a button ('addreview') on the client form I need this to open a new record on the review form. I also need the field 'policy' to be set to the value which was in 'policy' in the 'client' form.
So far this is the code I have;
Private Sub addreview_Click()
DoCmd.OpenForm ("review"
DoCmd.GoToRecord acDataForm, "review", acNewRec
DoCmd.Close acForm, "client"
End Sub
This opens the new form & goes to a new record however I'm having trouble setting the 'policy' field based on data in the 'client' form.
I'm wondering if I should use a public variable to transfer data from one form to the other however I haven't had much success with this.
Any help\guidance would be appreciated.
Grieg.