If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Is it possible to make checkbox unavailable...
.... when a specific value is selected in a text box?
Thanks, Adam |
#2
|
|||
|
|||
Is it possible to make checkbox unavailable...
Adam,
Place the following code, modified to the name of your controls, in the AfterUpdate event of the text or combo box, and in the form's OnCurrent event. If Me![YourTextorComboBox].Value = SomeValue Then Me![YourCheckbox].Enabled = False End If Sprinks "Adam" wrote: ... when a specific value is selected in a text box? Thanks, Adam |
#3
|
|||
|
|||
Is it possible to make checkbox unavailable...
Thanks for the quick reply. Tried the following, threw a complie error. I
think it may be b/c the value I am trying to check for "NE AB" has a space? Thoughts? What does the "ME!" represent? Thanks! Private Sub Form_Open(Cancel As Integer) If Me![NEAB].Value = NE AB Then Me![IntendToKeepBrands].Enabled = False End Sub "Sprinks" wrote: Adam, Place the following code, modified to the name of your controls, in the AfterUpdate event of the text or combo box, and in the form's OnCurrent event. If Me![YourTextorComboBox].Value = SomeValue Then Me![YourCheckbox].Enabled = False End If Sprinks "Adam" wrote: ... when a specific value is selected in a text box? Thanks, Adam |
#4
|
|||
|
|||
Is it possible to make checkbox unavailable...
If Me![NEAB].Value = "NE AB" Then
Text values have to be surrounded with quote marks. "Adam" wrote: Thanks for the quick reply. Tried the following, threw a complie error. I think it may be b/c the value I am trying to check for "NE AB" has a space? Thoughts? What does the "ME!" represent? Thanks! Private Sub Form_Open(Cancel As Integer) If Me![NEAB].Value = NE AB Then Me![IntendToKeepBrands].Enabled = False End Sub "Sprinks" wrote: Adam, Place the following code, modified to the name of your controls, in the AfterUpdate event of the text or combo box, and in the form's OnCurrent event. If Me![YourTextorComboBox].Value = SomeValue Then Me![YourCheckbox].Enabled = False End If Sprinks "Adam" wrote: ... when a specific value is selected in a text box? Thanks, Adam |
#5
|
|||
|
|||
Is it possible to make checkbox unavailable...
Debugger runs with the "Me![IntendToKeepBrands].Enabled = False" highlighted
when I load the form with the following. Ideas? Private Sub Form_Open(Cancel As Integer) If Me![NEAB].Value = "NE AB" Then Me![IntendToKeepBrands].Enabled = False End If End Sub "Klatuu" wrote: If Me![NEAB].Value = "NE AB" Then Text values have to be surrounded with quote marks. "Adam" wrote: Thanks for the quick reply. Tried the following, threw a complie error. I think it may be b/c the value I am trying to check for "NE AB" has a space? Thoughts? What does the "ME!" represent? Thanks! Private Sub Form_Open(Cancel As Integer) If Me![NEAB].Value = NE AB Then Me![IntendToKeepBrands].Enabled = False End Sub "Sprinks" wrote: Adam, Place the following code, modified to the name of your controls, in the AfterUpdate event of the text or combo box, and in the form's OnCurrent event. If Me![YourTextorComboBox].Value = SomeValue Then Me![YourCheckbox].Enabled = False End If Sprinks "Adam" wrote: ... when a specific value is selected in a text box? Thanks, Adam |
#6
|
|||
|
|||
Is it possible to make checkbox unavailable...
.... the error is '438' Object doesn't support this property or method.
"Klatuu" wrote: If Me![NEAB].Value = "NE AB" Then Text values have to be surrounded with quote marks. "Adam" wrote: Thanks for the quick reply. Tried the following, threw a complie error. I think it may be b/c the value I am trying to check for "NE AB" has a space? Thoughts? What does the "ME!" represent? Thanks! Private Sub Form_Open(Cancel As Integer) If Me![NEAB].Value = NE AB Then Me![IntendToKeepBrands].Enabled = False End Sub "Sprinks" wrote: Adam, Place the following code, modified to the name of your controls, in the AfterUpdate event of the text or combo box, and in the form's OnCurrent event. If Me![YourTextorComboBox].Value = SomeValue Then Me![YourCheckbox].Enabled = False End If Sprinks "Adam" wrote: ... when a specific value is selected in a text box? Thanks, Adam |
#7
|
|||
|
|||
Is it possible to make checkbox unavailable...
Got it!
Thanks for the help. "Adam" wrote: ... the error is '438' Object doesn't support this property or method. "Klatuu" wrote: If Me![NEAB].Value = "NE AB" Then Text values have to be surrounded with quote marks. "Adam" wrote: Thanks for the quick reply. Tried the following, threw a complie error. I think it may be b/c the value I am trying to check for "NE AB" has a space? Thoughts? What does the "ME!" represent? Thanks! Private Sub Form_Open(Cancel As Integer) If Me![NEAB].Value = NE AB Then Me![IntendToKeepBrands].Enabled = False End Sub "Sprinks" wrote: Adam, Place the following code, modified to the name of your controls, in the AfterUpdate event of the text or combo box, and in the form's OnCurrent event. If Me![YourTextorComboBox].Value = SomeValue Then Me![YourCheckbox].Enabled = False End If Sprinks "Adam" wrote: ... when a specific value is selected in a text box? Thanks, Adam |
#8
|
|||
|
|||
Is it possible to make checkbox unavailable...
I thought i had it working, but now it's throwing an error and highlights the
second line. Ideas? Private Sub Form_Open(Cancel As Integer) If Me![ABNE].Value = "AB EA" Then Me![IntendToKeepBrands].Enabled = False Me![WillingToSellBrands].Enabled = False Else Me![IntendToKeepBrands].Enabled = True Me![WillingToSellBrands].Enabled = True End If "Adam" wrote: Got it! Thanks for the help. "Adam" wrote: ... the error is '438' Object doesn't support this property or method. "Klatuu" wrote: If Me![NEAB].Value = "NE AB" Then Text values have to be surrounded with quote marks. "Adam" wrote: Thanks for the quick reply. Tried the following, threw a complie error. I think it may be b/c the value I am trying to check for "NE AB" has a space? Thoughts? What does the "ME!" represent? Thanks! Private Sub Form_Open(Cancel As Integer) If Me![NEAB].Value = NE AB Then Me![IntendToKeepBrands].Enabled = False End Sub "Sprinks" wrote: Adam, Place the following code, modified to the name of your controls, in the AfterUpdate event of the text or combo box, and in the form's OnCurrent event. If Me![YourTextorComboBox].Value = SomeValue Then Me![YourCheckbox].Enabled = False End If Sprinks "Adam" wrote: ... when a specific value is selected in a text box? Thanks, Adam |
#9
|
|||
|
|||
Is it possible to make checkbox unavailable...
You may want to move this code into the Form_Current event, for two reasons:
recordsets aren't reliably available in the Form_Open event, and you will probably want the checkboxes enabled/disabled on each record change. If you really need to check/adjust field values /control properties when the form loads, use the Form_Load event. HTH, Carl Rapson "Adam" wrote in message ... I thought i had it working, but now it's throwing an error and highlights the second line. Ideas? Private Sub Form_Open(Cancel As Integer) If Me![ABNE].Value = "AB EA" Then Me![IntendToKeepBrands].Enabled = False Me![WillingToSellBrands].Enabled = False Else Me![IntendToKeepBrands].Enabled = True Me![WillingToSellBrands].Enabled = True End If "Adam" wrote: Got it! Thanks for the help. "Adam" wrote: ... the error is '438' Object doesn't support this property or method. "Klatuu" wrote: If Me![NEAB].Value = "NE AB" Then Text values have to be surrounded with quote marks. "Adam" wrote: Thanks for the quick reply. Tried the following, threw a complie error. I think it may be b/c the value I am trying to check for "NE AB" has a space? Thoughts? What does the "ME!" represent? Thanks! Private Sub Form_Open(Cancel As Integer) If Me![NEAB].Value = NE AB Then Me![IntendToKeepBrands].Enabled = False End Sub "Sprinks" wrote: Adam, Place the following code, modified to the name of your controls, in the AfterUpdate event of the text or combo box, and in the form's OnCurrent event. If Me![YourTextorComboBox].Value = SomeValue Then Me![YourCheckbox].Enabled = False End If Sprinks "Adam" wrote: ... when a specific value is selected in a text box? Thanks, Adam |
Thread Tools | |
Display Modes | |
|
|