Advertisement

06.25.2008 at 09:26AM PDT, ID: 23515175
[x]
Attachment Details

Save only if records match VBA Access Code

Asked by life42 in Access Forms, Access Coding/Macros

Tags: , , ,

What I want to do is save the record only if the Employee Number from the combo box and the underlying table match. here is the code I have I am getting an error message that an object is missing.
Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
Private Sub btn_SaveRecord_Click()
If Me.EmployeeNumber.Value = Me.cbo_EmployeeNumber.Column(1) Then
 
RunCommand acCmdSaveRecord
 
Else
MsgBox "Employee Numbers do not match please choose the right employee number", vbOKCancel + vbInformation, "INFORMATION"
End If
 
End Sub
[+][-]06.25.2008 at 09:45AM PDT, ID: 21867582

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.25.2008 at 10:11AM PDT, ID: 21867796

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.26.2008 at 08:07PM PDT, ID: 21880746

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Access Forms, Access Coding/Macros
Tags: Microsoft, Access, 2003, VBA, Code
Sign Up Now!
Solution Provided By: boag2000
Participating Experts: 2
Solution Grade: A
 
 
[+][-]06.27.2008 at 02:32PM PDT, ID: 21887878

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628