A family of Microsoft relational database management systems designed for ease of use.
Is the control itself -- the combo box or list box on the form -- named "Machine Name" or "Machine_Name"?
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have a Form in Access.
On the "On Load Event", I have specified the following VB: Me.STD_MAN_HOURS_REQD_TO_MAKE_PART.Visible = False
Me.Label59.Visible = False
On the Form, on the Before Update Event of the field [PART_NEEDS_FABRICATION_OR_MACHINING], I have specified the following VB: Me.STD_MAN_HOURS_REQD_TO_MAKE_PART.Visible = True
Me.Label59.Visible = True
None of this works, and when I try to open the form I get this message and get taken directly to the vb "Compile error, method or data Member not found"
I have used this code for Buttons before and it works for that.
Please help solve my problem!
A family of Microsoft relational database management systems designed for ease of use.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Is the control itself -- the combo box or list box on the form -- named "Machine Name" or "Machine_Name"?
I was able to fix the problem with the help of some other persons comments regarding the compiling of the VB, to see the other errors in the VB preventing the Visible = true from working. Thanks for your help!
in my VB is have this code " Me.[Machine_Name].ListIndex <> -1" when I compile, it stops here and says Compile error "Method or data Member not Found" . The purpose of the -1 is to show no selection was made in the Combobox for [Machine Name].
I do not know why, because it worked fine a few days ago, and the the Compile passes over the code just before it called "Me.DATE_OF_STANDARD1.ListIndex <> -1"
The Rowsource for the Machine Name Field is: SELECT [6 - MACHINE_TYPES_AVAILABLE_FOR_MANUFACTURE].ID, [6 - MACHINE_TYPES_AVAILABLE_FOR_MANUFACTURE].MACHINE_NAME FROM [6 - MACHINE_TYPES_AVAILABLE_FOR_MANUFACTURE] ORDER BY [MACHINE_NAME];
Do you have any Ideas on this?
You are a Star! Your help is Greatly Appreciated, and it worked.! I ended up with a couple of compile errors, which I could sort out, and now it works well.
When you get the error and it brings you to the VB window, it should be highlighting the name that it doesn't recognize. What is highlighted?
In the VB editor, choose Debug > Compile, and fix any issues.
Make sure you have Option Explicit at the top of every module, and set it as default under Tools > Options > Require variable declaration.
If this label is associated with this textbox, you don't have to set visibility separately.