Hello,
Thank you for your interest in my problem. I'm currently having an issue with my VBA code (posted below)...or should I say, I don't know what I'm doing and I don't know how to fix my problem
So I've got a check box, that when selected "true", enables a text box and visa-versa. The function seems to work good, but when I've got two problems. One is that when the form opens, even though the check box is selected, it has the text box disabled (with data entered in the box).
The other problem is that I don't know how to have two instances of the same code. For example, I've got my "Parts_On_Order" set up in "Form_Current" and I would also like to have the exact same thing for "Parts_Required".
I think I'm actually talking about the same problem, but I'm not too sure, I'm very new to this software.
One other question, and this is embarrassing as I literally just got this code from this website and inserted it into my form, but what is the difference between having "Me!" and "Me." ?
Thanks for any help you can provide,
~FOX~
Thank you for your interest in my problem. I'm currently having an issue with my VBA code (posted below)...or should I say, I don't know what I'm doing and I don't know how to fix my problem
So I've got a check box, that when selected "true", enables a text box and visa-versa. The function seems to work good, but when I've got two problems. One is that when the form opens, even though the check box is selected, it has the text box disabled (with data entered in the box).
The other problem is that I don't know how to have two instances of the same code. For example, I've got my "Parts_On_Order" set up in "Form_Current" and I would also like to have the exact same thing for "Parts_Required".
I think I'm actually talking about the same problem, but I'm not too sure, I'm very new to this software.
One other question, and this is embarrassing as I literally just got this code from this website and inserted it into my form, but what is the difference between having "Me!" and "Me." ?
Code:
Private Sub Form_Current()
If Me.Parts_On_Order.Value = -1 Then
Me!PO.Enabled = False
Me!Parts_ETA.Enabled = False
Me!Parts_Notes.Enabled = False
Else
Me!PO.Enabled = True
Me!Parts_ETA.Enabled = True
Me!Parts_Notes.Enabled = True
End If
End Sub
Private Sub Parts_On_Order_Click()
If Me!Parts_On_Order.Value = True Then
Me!PO.Enabled = True
Me!Parts_ETA.Enabled = True
Me!Parts_Notes.Enabled = True
Else
Me!PO.Enabled = False
Me!Parts_ETA.Enabled = False
Me!Parts_Notes.Enabled = False
Me!PO.Value = Null
Me!Parts_ETA.Value = Null
Me!Parts_Notes.Value = Null
End If
End Sub
Private Sub Parts_Required_Click()
If Me!Parts_Required.Value = True Then
Me!Part_Numbers_Description.Enabled = True
Me!Parts_Required_By.Enabled = True
Else
Me!Part_Numbers_Description.Enabled = False
Me!Parts_Required_By.Enabled = False
Me!Part_Numbers_Description.Value = Null
Me!Parts_Required_By.Value = Null
End If
End Sub
Thanks for any help you can provide,
~FOX~