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.
At this point, the "Client's" form opens but to the client's information.
Here is what I have so far for the ClientSearch Form:
Option Compare Database
Private Sub ViewClients()
On Error GoTo Err_ViewClients
DoCmd.OpenForm "Clients"
Exit_ViewClients:
Exit Sub
Err_ViewClients:
MsgBox Err.Description
Resume Exit_ViewClients
End Sub
Private Sub ClientID_DblClick(Cancel As Integer)
ViewClients
End Sub
Private Sub ContactLastName_DblClick(Cancel As Integer)
DoCmd.OpenForm "Clients"
End Sub
Private Sub ContactFirstName_DblClick(Cancel As Integer)
DoCmd.OpenForm "Clients"
End Sub
Private Sub NextActionDate_DblClick(Cancel As Integer)
DoCmd.OpenForm "Clients"
End Sub
Private Sub Case_Worker_DblClick(Cancel As Integer)
DoCmd.OpenForm "Clients"
End Sub
--------------------------------------------
and this is what I have for the "Clients" Form (only the portion that
pertains to the search)
Option Compare Database
Option Explicit
Dim cboOriginator As ComboBox
Private Sub Form_Open(Cancel As Integer)
If Not IsLoaded("ClientSearch") Then
MsgBox "Open the Projects form using the Projects button on the
Client Search form."
Cancel = True
End If
End Sub
Private Sub Form_Activate()
On Error GoTo Err_Form_Activate
Me.Requery
Exit_Form_Activate:
Exit Sub
Err_Form_Activate:
MsgBox Err.Description
Resume Exit_Form_Activate
End Sub
Private Sub Form_BeforeInsert(Cancel As Integer)
On Error GoTo Err_Form_BeforeInsert
Me![ClientID] = Forms![ClientSearch]![ClientID]
Exit_Form_BeforeInsert:
Exit Sub
Err_Form_BeforeInsert:
MsgBox Err.Description
Resume Exit_Form_BeforeInsert
End Sub
Private Sub Form_Load()
If Me.OpenArgs = "GotoNew" And Not IsNull([ClientID]) Then
DoCmd.DoMenuItem acFormBar, 3, 0, , acMenuVer70
End If
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.
At this point, the "Client's" form opens but to the client's information.
Here is what I have so far for the ClientSearch Form:
Option Compare Database
Private Sub ViewClients()
On Error GoTo Err_ViewClients
DoCmd.OpenForm "Clients"
Exit_ViewClients:
Exit Sub
Err_ViewClients:
MsgBox Err.Description
Resume Exit_ViewClients
End Sub
Private Sub ClientID_DblClick(Cancel As Integer)
ViewClients
End Sub
Private Sub ContactLastName_DblClick(Cancel As Integer)
DoCmd.OpenForm "Clients"
End Sub
Private Sub ContactFirstName_DblClick(Cancel As Integer)
DoCmd.OpenForm "Clients"
End Sub
Private Sub NextActionDate_DblClick(Cancel As Integer)
DoCmd.OpenForm "Clients"
End Sub
Private Sub Case_Worker_DblClick(Cancel As Integer)
DoCmd.OpenForm "Clients"
End Sub
--------------------------------------------
and this is what I have for the "Clients" Form (only the portion that
pertains to the search)
Option Compare Database
Option Explicit
Dim cboOriginator As ComboBox
Private Sub Form_Open(Cancel As Integer)
If Not IsLoaded("ClientSearch") Then
MsgBox "Open the Projects form using the Projects button on the
Client Search form."
Cancel = True
End If
End Sub
Private Sub Form_Activate()
On Error GoTo Err_Form_Activate
Me.Requery
Exit_Form_Activate:
Exit Sub
Err_Form_Activate:
MsgBox Err.Description
Resume Exit_Form_Activate
End Sub
Private Sub Form_BeforeInsert(Cancel As Integer)
On Error GoTo Err_Form_BeforeInsert
Me![ClientID] = Forms![ClientSearch]![ClientID]
Exit_Form_BeforeInsert:
Exit Sub
Err_Form_BeforeInsert:
MsgBox Err.Description
Resume Exit_Form_BeforeInsert
End Sub
Private Sub Form_Load()
If Me.OpenArgs = "GotoNew" And Not IsNull([ClientID]) Then
DoCmd.DoMenuItem acFormBar, 3, 0, , acMenuVer70
End If
End Sub
-----------------------------------------------------------
As you can probably tell I am doing this in piecework! Any help is greatly
appreciated!!!!
Thanx so much.