D
dbalorenzini
I have a main form (frmClientDetail) on which there is a dropdown list
(cboStatus). What I need is to be able to open a pop form (frmWithdrawl) in
add mode if they change cboStatus to "Inactive". I am not sure how to write
the openform statement linked to the appropriate frmClientDetail record in
add mode. I am thinking something along the lines of this:
sub cbo_status_afterupdat()
Dim sWHere as string
If cboStatus = "Inactive" then
Openform frmWithdrawal, stWhere, addmode
End if
Also how would I define the sWhere string the contains the join information.
in this case it would be
frmClientDetail.ID = frmWithdrawl.ClientID
another thing, is the clientid in the frmWithdrawal is not the PK to the
table. It has a column called ID (autonumber) that is the PK. THis is the
code I have so far:
If Me.Status = "Inactive" Then
iClientID = Me.ID
'DoCmd.OpenForm "frmClientWithdraw", wherecondition:="ClientID=" &
Me.ClientID = Forms!frmClientDetail![ID], DataMode:=acFormAdd
' DoCmd.OpenForm "frmClientWithdraw", acNormal, , , acFormAdd, ,
[ClientID] = iClientID
DoCmd.OpenForm "frmClientWithdraw", , , , acFormAdd, acWindowNormal, Me.ID
End If
(cboStatus). What I need is to be able to open a pop form (frmWithdrawl) in
add mode if they change cboStatus to "Inactive". I am not sure how to write
the openform statement linked to the appropriate frmClientDetail record in
add mode. I am thinking something along the lines of this:
sub cbo_status_afterupdat()
Dim sWHere as string
If cboStatus = "Inactive" then
Openform frmWithdrawal, stWhere, addmode
End if
Also how would I define the sWhere string the contains the join information.
in this case it would be
frmClientDetail.ID = frmWithdrawl.ClientID
another thing, is the clientid in the frmWithdrawal is not the PK to the
table. It has a column called ID (autonumber) that is the PK. THis is the
code I have so far:
If Me.Status = "Inactive" Then
iClientID = Me.ID
'DoCmd.OpenForm "frmClientWithdraw", wherecondition:="ClientID=" &
Me.ClientID = Forms!frmClientDetail![ID], DataMode:=acFormAdd
' DoCmd.OpenForm "frmClientWithdraw", acNormal, , , acFormAdd, ,
[ClientID] = iClientID
DoCmd.OpenForm "frmClientWithdraw", , , , acFormAdd, acWindowNormal, Me.ID
End If