[mso] Access VB Code Needed (more)

  • From: "April Pace" <4office@xxxxxxxxxxxxx>
  • To: "Office (E-mail)" <mso@xxxxxxxxxxxxx>
  • Date: Fri, 3 Jan 2003 14:37:26 -0500

Ok I have a checkbox (cbxCltRespon) with the question:

Is the Responsible Party Different then the Client?  If they Check it (yes)
then the sfrmContResp form will pop-up, if then don't check it then I want
it to populate the txtCltResponName field with the First and Last name of
the Client.  Did I do the Code Correctly??



Private Sub cbxCltRespon_AfterUpdate()
If Me.cbxCltRespon.Value = True Then
        DoCmd.OpenForm "sfrmContactResponParty"
    Else
            txtCltResponName = "txtCltFName" & "txtCltLName"
    End If

End Sub

Also the next Field is a checkbox also that asks if the Contact is the same
as the Responsible Party... If it is then populate the txtConName Field with
the name in the txtCltResponName unless that has been populated with the
Client Name above, please tell me if I wrote this code correctly also:
(note, The Responsible party can be the Client or somebody different.... The
Contact Name Can be the Responsible Party if the responsible Party is not
the Client)

Private Sub cbxContRespon_AfterUpdate()

If Me.cbxContRespon.Value = True And Me.cbxCltRespon = True Then

'(Saying the Contact Name=Responsible Name) and the (Responsible Party is
Different from the Client Name)

        txtCltContactName = txtCltResponName
    Else
'(Saying the Contact Name=Responsible Name but they did NOT check that the
Responsible party was different from the Client)

        Me.cbxContRespon.Value = True And Me.cbxCltRespon = False

'Can I make this msg be two lines?

        MsgBox "You have stated that the Responsible party is the client" &
_
              "The Contact Name MUST be different"
    Else
        Me.cbxContRespon.Value = False
        DoCmd.OpenForm "sfrmContactResponParty"

    End If
End Sub



*************************************************************
You are receiving this mail because you subscribed to mso@xxxxxxxxxxxxx or 
MicrosoftOffice@xxxxxxxxxxxxxxxx

To send mail to the group, simply address it to mso@xxxxxxxxxxxxx

To Unsubscribe from this group, send an email to 
mso-request@xxxxxxxxxxxxx?Subject=unsubscribe

Or, visit the group's homepage and use the dropdown menu.  This will also allow 
you to change your email settings to digest or vacation (no mail).
//www.freelists.org/webpage/mso

To be able to use the files section for sharing files with the group, send a 
request to mso-moderators@xxxxxxxxxxxxx and you will be sent an invitation with 
instructions.  Once you are a member of the files group, you can go here to 
upload/download files:
http://www.smartgroups.com/vault/msofiles
*************************************************************

Other related posts: