B
bunnyca
This has been driving me nuts for about a week now so I thought someone more
experienced might have the answer as although it's complex for me, the
newbie, it really is realtively simple.
Q: I am using Access 2000. I have a client database. I am making a search
form. The form is in dataview. It gets it's info. from a query that sorts the
info from the client table. The info consists of the contactfirstname,
contactlastname, ClientID, nextactiondate, and case status.
When the user double clicks on a particular client's info. I would like for
the "Clients" form to open up to that client's information by matching the
ClientID.
Note the ClientID is "Required" and is the primary key.
At this point, the "Clients" form opens but not to the client's specific
information.
I do not have coding regarding this in the "Clients" form coding.
Here is what I have so far for the "ClientSearch" Form coding:
Option Compare Database
Private Sub OpenClients()
DoCmd.OpenForm "Clients", acNormal, , , acReadOnly, , lClientID
End Sub
Sub Form_Open(Cancel As Integer)
Dim lClientID As Long
' If OpenArgs property contains employee name, find
' corresponding employee record and display it on form. For
' example,if the OpenArgs property contains "Callahan",
' move to first "Callahan" record.
lClientID = Forms!Clients.OpenArgs
If lClientID > 0 Then
DoCmd.GoToControl "ClientID"
DoCmd.FindRecord lClientID, , True, , True, , True
End If
End Sub
Private Sub ClientID_DblClick(Cancel As Integer)
OpenClients
End Sub
Private Sub ContactLastName_DblClick(Cancel As Integer)
OpenClients
End Sub
Private Sub ContactFirstName_DblClick(Cancel As Integer)
OpenClients
End Sub
Private Sub NextActionDate_DblClick(Cancel As Integer)
OpenClients
End Sub
Private Sub Case_Worker_DblClick(Cancel As Integer)
OpenClients
End Sub
-----------------------------------------------------------
As you can probably tell I am doing this in piecework! Any help is greatly
appreciated!!!!
Thanx so much.
experienced might have the answer as although it's complex for me, the
newbie, it really is realtively simple.
Q: I am using Access 2000. I have a client database. I am making a search
form. The form is in dataview. It gets it's info. from a query that sorts the
info from the client table. The info consists of the contactfirstname,
contactlastname, ClientID, nextactiondate, and case status.
When the user double clicks on a particular client's info. I would like for
the "Clients" form to open up to that client's information by matching the
ClientID.
Note the ClientID is "Required" and is the primary key.
At this point, the "Clients" form opens but not to the client's specific
information.
I do not have coding regarding this in the "Clients" form coding.
Here is what I have so far for the "ClientSearch" Form coding:
Option Compare Database
Private Sub OpenClients()
DoCmd.OpenForm "Clients", acNormal, , , acReadOnly, , lClientID
End Sub
Sub Form_Open(Cancel As Integer)
Dim lClientID As Long
' If OpenArgs property contains employee name, find
' corresponding employee record and display it on form. For
' example,if the OpenArgs property contains "Callahan",
' move to first "Callahan" record.
lClientID = Forms!Clients.OpenArgs
If lClientID > 0 Then
DoCmd.GoToControl "ClientID"
DoCmd.FindRecord lClientID, , True, , True, , True
End If
End Sub
Private Sub ClientID_DblClick(Cancel As Integer)
OpenClients
End Sub
Private Sub ContactLastName_DblClick(Cancel As Integer)
OpenClients
End Sub
Private Sub ContactFirstName_DblClick(Cancel As Integer)
OpenClients
End Sub
Private Sub NextActionDate_DblClick(Cancel As Integer)
OpenClients
End Sub
Private Sub Case_Worker_DblClick(Cancel As Integer)
OpenClients
End Sub
-----------------------------------------------------------
As you can probably tell I am doing this in piecework! Any help is greatly
appreciated!!!!
Thanx so much.