S
SylvieB
Hello group,
On a Lead form, I have a combo box (txtClosedReason) with 4 options to
select from when a lead closes. Only when “convert to opportunity†is chosen,
another form display with the information from the Lead form. This works
fine. However, what I want to accomplish is when “convert to opportunity†is
selected and a check mark is put on the “Close Now†check box (chkClose),
only then the data displays on the Opportunity form and the “today date†is
automatically displays. The "today date" part is working fine as well. Thank
you in advance for any help.
Here is the codes I have :
Private Sub txtClosedReason_AfterUpdate()
Dim strWhere As String
If txtClosedReason = "convert to opportunity" Then
strWhere = "ID= " & Me.ID
DoCmd.OpenForm "opportunities details", whereCondition:=strWhere
End If
End sub
Private Sub chkClose_AfterUpdate()
If Me!chkClose = True Then
Me!txtClose = Date
Else
Me!txtClose = Null
End If
Me.Dirty = True
End Sub
On a Lead form, I have a combo box (txtClosedReason) with 4 options to
select from when a lead closes. Only when “convert to opportunity†is chosen,
another form display with the information from the Lead form. This works
fine. However, what I want to accomplish is when “convert to opportunity†is
selected and a check mark is put on the “Close Now†check box (chkClose),
only then the data displays on the Opportunity form and the “today date†is
automatically displays. The "today date" part is working fine as well. Thank
you in advance for any help.
Here is the codes I have :
Private Sub txtClosedReason_AfterUpdate()
Dim strWhere As String
If txtClosedReason = "convert to opportunity" Then
strWhere = "ID= " & Me.ID
DoCmd.OpenForm "opportunities details", whereCondition:=strWhere
End If
End sub
Private Sub chkClose_AfterUpdate()
If Me!chkClose = True Then
Me!txtClose = Date
Else
Me!txtClose = Null
End If
Me.Dirty = True
End Sub