Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with Forms- Option Group

Status
Not open for further replies.

mje397

Programmer
Nov 3, 2004
17
US
I am creating a form with an option group with the following
work -1
school -2
shopping -3
other -4

If user selects 4, I want to input the text he is typing into the table or else input the number .
Plzz help on how to do this

 
Hi
Two possibilities I can think of, both are shown below:
Code:
Private Sub OptionFrame_AfterUpdate()
If Me!OptionFrame = 4 Then
    Me!EnterTextHere = 4
    DoCmd.GoToControl Me!EnterTextHere
End If
End Sub
 
I'm trying to do something similar. I have an option Frame with 3 options.
1- In Store (with 3 non exclusive checkboxes greyed out or disabled)
2- Out Store
3- Mobile

If the first option is selected I would like to have 3 checkboxes (Y/N non exclusive) stop being greyed out. I tried code like the above, but get an error.

Code:
Private Sub Toggle98_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Me.School_Location = 1 Then
Me.School_onSite_Elementary.Enabled = True
Else
Me.School_onSite_Elementary.Enabled = False
End If
End Sub
But when it gets to the Me.Checkbox.Enabled = True I get an error. "Compile Error, Method or data member not found."

Any suggestions?
Thank You in Advanced.
 
Hi
I didn't quite catch that. Your code seems to refer to a toggle button but your text refers to a checkbox. What am I missing?
 
How are ya mje397 . . . . .
mje397 said:
[blue]If user selects 4, [purple]I want to input the text he is typing into the table or else input the number.[/purple]
Plzz help on how to do this[/blue]
[purple]Be more specific about this . . .[/purple]


Calvin.gif
See Ya! . . . . . .
 
How are ya mje397 . . . . .
mje397 said:
[blue]If user selects 4, [purple]I want to input the text he is typing into the table or else input the number.[/purple]
Plzz help on how to do this[/blue]
[purple]Be more specific about this . . .[/purple]


Calvin.gif
See Ya! . . . . . .
 
hi aceman,,

I have changed my application a bit..

I have a combo box in a form with the following options.
Work, School,Shopping, and Other

The associated id's are 1, 2, 3, and 4

If the user selects work, 1 will be stored in the database
if he selects 2 school will be stored

Now if he selects 4 I want to save the text entered by user in the database..

Any idea how to do this..
 
How are ya guayabita . . . . .

We have no problem helping you . . . at all! But you should start your own thread (get full attention to your specific problem) as this takes away from [blue]mje397's[/blue] specific problem and [blue]not quite fair to him/her[/blue]. I'm sure if you started a thread, you would want all the attention to yourself . . . .

Calvin.gif
See Ya! . . . . . .
 
mje397 said:
[blue]If the user selects work, 1 will be stored in the database
if he selects 2 school will be stored[/blue]
Stored in the database where?

[blue]Surely you don't want to make a new record with a single field value?[/blue]

[purple]Perhaps your talking populating a textbox on a form?[/purple]

Calvin.gif
See Ya! . . . . . .
 
Hello TheAceMan1!

Thanks for your reply. Your right I will start a new thread. I do think I understand mje397. So mje397 has gotten as far as saving the selection from the combobox to a field in a record.

Right, mje397?

Now what mje397 needs is if the input = 4 to enable the text box and save it a field.

mje397, I'm sorry if I stepped on your thread. I think your answer will come down to enabling that textbox based on someone selecting option 4 for the combobox.
 
Thnx Aceman,,

I am populating a table in Access using a frorm. Say for example,, I have a column named "PURPOSE OF TRIP"

the possible entries are 1, 2, 3, or 4 where the numbers correspond to work, school, shopping, other. I am using a combo box in the form for this application. Now if the user selects 4 then I need to go to the next box to enter his purpose of trip. If not it will skip that box and go to the next box.

The value entered in this box will be stored in the next column in database. It will be filled only for those rows where "purpose of trip" is 4 . Rest fields will be blank.

Does this make sense?

Lemme know if you need more clarification..
Thnx in advance
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top