sheesh.katie
Registered User.
- Local time
- Today, 02:33
- Joined
- Aug 8, 2012
- Messages
- 10
Hi!
I'm sort of new to Access and can't really say I know what I'm doing. The things I don't know, I get from Google and other people's posts. Problem is I can't seem to find results for what I'm looking for on Access, but can find plenty of results for Javascript!:banghead: I'm creating a database for Recycling where the information can be entered on a form for each recycle station whenever the company has new recycle entries.
The option box has two options: Trash (1) and Recycle (2). Whenever one is selected, it enters a one or a two into a field on my main table, which is great. I want it to do that. The trouble is, though, that on the form whenever an option is selected, I want it to make only those text boxes for that option available.
(In the form, there's the Option Box, then Materials and Material Weight, meant for whenever trash is selected, and Recyclable and Recyclable Weight, meant for whenever recycle is selected.)
I found this code on google that seemed like it was what I wanted, but for some reason the Recyclable box becomes dimmed no matter what the choices are, instead of switching back and forth between what's available. Here's the code:
Private Sub optbox_AfterUpdate()
Select Case Me.optbox.Value
Case 1
cboRecycle.Enabled = False
Case 2
cboRecycle.Enabled = True
End Select
End Sub
cboRecycle is my "Recyclable" box.
I do like how it's dimmed, if only I could get it to switch according to the options! Like I said, I'm new to this, so if somebody could help me out quickly and dumb it down for me, that'd be great!
I'm sort of new to Access and can't really say I know what I'm doing. The things I don't know, I get from Google and other people's posts. Problem is I can't seem to find results for what I'm looking for on Access, but can find plenty of results for Javascript!:banghead: I'm creating a database for Recycling where the information can be entered on a form for each recycle station whenever the company has new recycle entries.
The option box has two options: Trash (1) and Recycle (2). Whenever one is selected, it enters a one or a two into a field on my main table, which is great. I want it to do that. The trouble is, though, that on the form whenever an option is selected, I want it to make only those text boxes for that option available.
(In the form, there's the Option Box, then Materials and Material Weight, meant for whenever trash is selected, and Recyclable and Recyclable Weight, meant for whenever recycle is selected.)
I found this code on google that seemed like it was what I wanted, but for some reason the Recyclable box becomes dimmed no matter what the choices are, instead of switching back and forth between what's available. Here's the code:
Private Sub optbox_AfterUpdate()
Select Case Me.optbox.Value
Case 1
cboRecycle.Enabled = False
Case 2
cboRecycle.Enabled = True
End Select
End Sub
cboRecycle is my "Recyclable" box.
I do like how it's dimmed, if only I could get it to switch according to the options! Like I said, I'm new to this, so if somebody could help me out quickly and dumb it down for me, that'd be great!
