Good afternoon All,
I know there is a way to do what I need, but I am a bit rusty with my Access skills. Any help is greatly appreciated!
Here is what I would like to do as an end result...
When my users enter a name on my form, I would like for the address and company information for that person automatically fill in. If they are not already in the contacts list, I would like for the record to be added. Any idea how I accomplish this?
So far I have the tblAccts (which would be the main information entered on the form), tblContacts (where the names, companies,and contact information is stored), and frmAcctOpen (the user's form for opening accounts).
It has been about 6+ years since I have really messed around with access, so please speak basic language in your answers.
The problem is matching as any small typo or different spelling will result in a mismatch. I would put an intermediate Dialog Box to allow users to search on Name or Company etc. Wildcards minimise input.
That is a good point. Could you point me in the right direction on how I would go about this? If I do a find from a form on a separate table, can I have the found record populate the record on the form I am working on? If so how would I do it?
If .[Search] = "N" Then
ClientsCriteria = "[Surname] like '" & .[Field1] & "*" & "' and [First Name] like '" & .[Field2] & "*" & "'"
ElseIf .[Search] = "C" Then
ClientsCriteria = "[Client Co Name] like '" & .[Field2] & "*" & "'"
Then on the Search Form a Command Button:
Function ClientsEntry() As String
DoCmd.OpenForm "Clients", , , ClientsCriteria
I have found that creating your own Criteria is best approach as it is declared once. I also search by Email address and Code.
I really appreciate the effort you put forth in answering my question, but I am I think a bit intimidated by it all. Due to my lack of messing around with Access in so long I am like a newbie all over again. To make matters worse, my books from class are in storage since I am in the transition of moving. Would you mind terribly breaking this down to the novice level? I am just not sure what is code and what is given values. Also, would I be putting this into the code builder for a form or a command button? Sorry to seem so ignorant, but after reading your post I realize just how ignorant and forgetful I am now!