[mso] Access Code Needed

  • From: "April Pace" <4office@xxxxxxxxxxxxx>
  • To: "Office (E-mail)" <mso@xxxxxxxxxxxxx>
  • Date: Wed, 8 Jan 2003 13:53:39 -0500

Can somebody help me write this: (it will be placed on the frmEmployeeInfo)


Private Sub CbxArea1_Click()

If Me!cbxArea1.Value = -1 Then

' Go to the table tblLocationArea access a NewRecord get the
' Employee's ID number from this form in field nbrEmpID and populate the
same field on the form then
' populate the txtEmpArea field with  "1"
'(the nbrAreaID is an autonumber)

Else

    ' Do Nothing
End If

End Sub

Also when I close the frmEmployeeInfo form I would need to add a validation
rule that  at least one of those checkboxes (there are 4 like the one
above - cbxArea2 etc.)  had been check .... if not then it would not close
and a message would appear:  "Please check which areas the Employee will
work in" and set the focus back on CbxArea1... Here is the code already on
the CommandClose:

Private Sub CommandClose_Click()
On Error GoTo Err_CommandClose_Click

    DoCmd.Close

Exit_CommandClose_Click:
    Exit Sub

Err_CommandClose_Click:
    MsgBox Err.Description
    Resume Exit_CommandClose_Click

End Sub

Thanks for ALL YOUR HELP!




*************************************************************
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: