Morning all,
I am a new user to the forums and to be honest my knowledge of Access still needs a lot of work.
I am trying to create a Database with some simple built in functions but I am running in to a few problems that I will try my best to explain.
My database will be used to record Sales Leads that are passed through from a team of off-site employees. I have posted an image of the tables that I have created and the relationships that I have set.
[image]http://img3.pictiger.com/c7f/14305096_th.jpg[/image]
I have made a simple form for my staff to use when recording these leads.
[image]http://img3.pictiger.com/51d/14305098_th.jpg[/image]
When a CIN is entered, I would like the user to be able to click on the "Check CIN" box to see if the CIN number has already been recorded in a previous record and if so, populate the form with the results. If the CIN number has not been recorded before then just leave the form blank.
I use the code below:
Private Sub Check_CIN_Click()
Screen.PreviousControl.SetFocus
DoCmd.FindRecord Forms!Leads!CIN, acEntire, False, acSearchAll, False, acAll, True
End Sub
I keep getting this error message
[image]http://img3.pictiger.com/632/14305099_th.jpg[/image]
This may be a problem with my relationships or the code it's self but I am at a loss.
Any help that you can give me on this subject would be fantastic.
Graham
I am a new user to the forums and to be honest my knowledge of Access still needs a lot of work.
I am trying to create a Database with some simple built in functions but I am running in to a few problems that I will try my best to explain.
My database will be used to record Sales Leads that are passed through from a team of off-site employees. I have posted an image of the tables that I have created and the relationships that I have set.
[image]http://img3.pictiger.com/c7f/14305096_th.jpg[/image]
I have made a simple form for my staff to use when recording these leads.
[image]http://img3.pictiger.com/51d/14305098_th.jpg[/image]
When a CIN is entered, I would like the user to be able to click on the "Check CIN" box to see if the CIN number has already been recorded in a previous record and if so, populate the form with the results. If the CIN number has not been recorded before then just leave the form blank.
I use the code below:
Private Sub Check_CIN_Click()
Screen.PreviousControl.SetFocus
DoCmd.FindRecord Forms!Leads!CIN, acEntire, False, acSearchAll, False, acAll, True
End Sub
I keep getting this error message
[image]http://img3.pictiger.com/632/14305099_th.jpg[/image]
This may be a problem with my relationships or the code it's self but I am at a loss.
Any help that you can give me on this subject would be fantastic.
Graham