Option Buttons

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have two option buttons one call ClientID the other Name. And i also have a
label with a text box call ClientID(text box being unbound). And the others
called First Name and one Last Name.

What i would like to do is be able to selec the client ID button and have
the cursor move to the Client ID Textbox. This is what i want

When I Select: Client ID option button have the cursor move to Client ID
text Box(which is Unbound)

When I select the Name option Button have the Cursor move to Last Name text
box automatically (Which is Unbound)

What do i need to do
 
Someone will correct me if I'm wrong, but I think this will work for you.

In the Event Procedure, add Control.SetFocus (ie, nameoftextbox.SetFocus)

Cheers,
Jay
 
I have set event Procedure on the Client and Name obtion button and i set
them to setfocus, but i think there is something else i need to do. Becasue
that did not work.
 
Jessica, These option buttons are probably in an "option group" and react
differently. Here is what you need to do.

The option group has a control name. If you click on the frame (in design
mode) surrounding the option buttons, the frame properties will pop-up. In
the "on-click" event select "event procedure" enter the code below.
(remember to replace he control names where neccessary. Be sure the "Option
Values" for each of the two option buttons are set to 1 and 2 respecitivley
(in order for this example to work)

Let's assume your option group is called frame19

Private Sub Frame19_Click()

If Me.[Frame19] = 1 Then
me.ClientID.SetFocus
Elseif Me.[Frame19] = 2
me.Last Name.SetFocus
End If

That will do it (-:

Jeff
 
Jessica, I probably shouldn't have assumed you have a group ( which
basically gives you an option choice scenario). In this case if you option
buttons are truly standalone (that is both buttons can be selected, then

in the on-click event of each option button, select event procedure and enter
the following lines in the function:

Will look something like this for EACH option (depending on thier name of
course)

Private Sub Option1_Click()
Me.ClientID.SetFocus
End Sub

Private Sub Option2_Click()
Me.LastName.SetFocus
End Sub

Hope this helps...

/Jeff


Jeff said:
Jessica, These option buttons are probably in an "option group" and react
differently. Here is what you need to do.

The option group has a control name. If you click on the frame (in design
mode) surrounding the option buttons, the frame properties will pop-up. In
the "on-click" event select "event procedure" enter the code below.
(remember to replace he control names where neccessary. Be sure the "Option
Values" for each of the two option buttons are set to 1 and 2 respecitivley
(in order for this example to work)

Let's assume your option group is called frame19

Private Sub Frame19_Click()

If Me.[Frame19] = 1 Then
me.ClientID.SetFocus
Elseif Me.[Frame19] = 2
me.Last Name.SetFocus
End If

That will do it (-:

Jeff
I have two option buttons one call ClientID the other Name. And i also have a
label with a text box call ClientID(text box being unbound). And the others
[quoted text clipped - 10 lines]
What do i need to do
 
all you have to do is go to your button on click event and create a macro.
One of the buit in functions is "GoToRecord".Select it and it will ask you to
put the name of the record you want to go to and type in the name of the field
this is much easier


Jeff O via AccessMonster.com said:
Jessica, I probably shouldn't have assumed you have a group ( which
basically gives you an option choice scenario). In this case if you option
buttons are truly standalone (that is both buttons can be selected, then

in the on-click event of each option button, select event procedure and enter
the following lines in the function:

Will look something like this for EACH option (depending on thier name of
course)

Private Sub Option1_Click()
Me.ClientID.SetFocus
End Sub

Private Sub Option2_Click()
Me.LastName.SetFocus
End Sub

Hope this helps...

/Jeff


Jeff said:
Jessica, These option buttons are probably in an "option group" and react
differently. Here is what you need to do.

The option group has a control name. If you click on the frame (in design
mode) surrounding the option buttons, the frame properties will pop-up. In
the "on-click" event select "event procedure" enter the code below.
(remember to replace he control names where neccessary. Be sure the "Option
Values" for each of the two option buttons are set to 1 and 2 respecitivley
(in order for this example to work)

Let's assume your option group is called frame19

Private Sub Frame19_Click()

If Me.[Frame19] = 1 Then
me.ClientID.SetFocus
Elseif Me.[Frame19] = 2
me.Last Name.SetFocus
End If

That will do it (-:

Jeff
I have two option buttons one call ClientID the other Name. And i also have a
label with a text box call ClientID(text box being unbound). And the others
[quoted text clipped - 10 lines]
What do i need to do
 
Thank you that work out. Know i have another question. The forms that has the
fields i mention before is name Search criteria Form, where i could search by
client id or Lastname. And i also have another form calle Search form where
all the clients are in. I would like for this two forms to interact. For
example

If i put in a client id and in the Search Critieria form and Click on the
Search commond button i added in, i would like it to take me to the Search
form where all the clients are at. I got it to work but it did not take me to
the EXACT client with the client ID i put in.

THe Search command button is linked to the search form which brings all the
clients. But i need it to look for the specific client i Put in in the Search
Criteria Form


Jeff O via AccessMonster.com said:
Jessica, These option buttons are probably in an "option group" and react
differently. Here is what you need to do.

The option group has a control name. If you click on the frame (in design
mode) surrounding the option buttons, the frame properties will pop-up. In
the "on-click" event select "event procedure" enter the code below.
(remember to replace he control names where neccessary. Be sure the "Option
Values" for each of the two option buttons are set to 1 and 2 respecitivley
(in order for this example to work)

Let's assume your option group is called frame19

Private Sub Frame19_Click()

If Me.[Frame19] = 1 Then
me.ClientID.SetFocus
Elseif Me.[Frame19] = 2
me.Last Name.SetFocus
End If

That will do it (-:

Jeff


I have two option buttons one call ClientID the other Name. And i also have a
label with a text box call ClientID(text box being unbound). And the others
called First Name and one Last Name.

What i would like to do is be able to selec the client ID button and have
the cursor move to the Client ID Textbox. This is what i want

When I Select: Client ID option button have the cursor move to Client ID
text Box(which is Unbound)

When I select the Name option Button have the Cursor move to Last Name text
box automatically (Which is Unbound)

What do i need to do
 
Jessica, if you want to reduce the records in a form when it opens then set
the filter values.

e.g;

form_clientform.filter = "[Lastname] = '" & Me.ClientID.Value & "'"
form_clientform.filteron = true
DoCmd.openform "clientform"

give it a shot...

/Jeff

Thank you that work out. Know i have another question. The forms that has the
fields i mention before is name Search criteria Form, where i could search by
client id or Lastname. And i also have another form calle Search form where
all the clients are in. I would like for this two forms to interact. For
example

If i put in a client id and in the Search Critieria form and Click on the
Search commond button i added in, i would like it to take me to the Search
form where all the clients are at. I got it to work but it did not take me to
the EXACT client with the client ID i put in.

THe Search command button is linked to the search form which brings all the
clients. But i need it to look for the specific client i Put in in the Search
Criteria Form
Jessica, These option buttons are probably in an "option group" and react
differently. Here is what you need to do.
[quoted text clipped - 34 lines]
 
Are you sure this is going to work. Do i put in this in the Search form or
the client form. What i have is a Search form where i have client id and last
name if i put in any of those information and click on the common search
button i want it to take me to the client form, but to the specifica client
i'm searching for. Becuse right know if i do that it just takes me to the
client form and i have to scroll down to the record i want. But is there a
way to go directly to that record From my Search form. You sent me the below
info. but where do i type that in

Jeff O via AccessMonster.com said:
Jessica, if you want to reduce the records in a form when it opens then set
the filter values.

e.g;

form_clientform.filter = "[Lastname] = '" & Me.ClientID.Value & "'"
form_clientform.filteron = true
DoCmd.openform "clientform"

give it a shot...

/Jeff

Thank you that work out. Know i have another question. The forms that has the
fields i mention before is name Search criteria Form, where i could search by
client id or Lastname. And i also have another form calle Search form where
all the clients are in. I would like for this two forms to interact. For
example

If i put in a client id and in the Search Critieria form and Click on the
Search commond button i added in, i would like it to take me to the Search
form where all the clients are at. I got it to work but it did not take me to
the EXACT client with the client ID i put in.

THe Search command button is linked to the search form which brings all the
clients. But i need it to look for the specific client i Put in in the Search
Criteria Form
Jessica, These option buttons are probably in an "option group" and react
differently. Here is what you need to do.
[quoted text clipped - 34 lines]
What do i need to do
 
Jessica, The "Client Form" your talking about. Sounds to me like you want a
form to "pop-up" with the correct information already filled in the fields.
But your implying the form has a drop-down combo list from which to select
client information from. If you want this "Client form" to "pop-up" with the
correct information, then just place text fields in the client form, make
sure the record source for the form points to the client table, and that all
text fields point to a field in the table, then in the "search form" in the
on-click event for the search button, put the filter code I stated earlier.
Make sure the filter code information is filled out with the correct control
names of your text fields and such.

Hope this helps, if not then give more information about the "client form"

/Jeff

Are you sure this is going to work. Do i put in this in the Search form or
the client form. What i have is a Search form where i have client id and last
name if i put in any of those information and click on the common search
button i want it to take me to the client form, but to the specifica client
i'm searching for. Becuse right know if i do that it just takes me to the
client form and i have to scroll down to the record i want. But is there a
way to go directly to that record From my Search form. You sent me the below
info. but where do i type that in
Jessica, if you want to reduce the records in a form when it opens then set
the filter values.
[quoted text clipped - 29 lines]
 
Jessica, To be sure you understand the filter code let me explain it.
the "clientform" as stated in the code represents the name of your client
form (NOT the search form)
(F.Y.I - can set another forms properties from a different form)
"LastName" represents the Primary Key field in your "client" table that your
"client" form points to.
Me.ClientId.Value the the current value of the "Client ID" selected from your
"search form" that is passed to the filter code.

So you need to make sure that everytrhing is correct here. OK (-:

/Jeff



form_clientform.filter = "[Lastname] = '" & Me.ClientID.Value & "'"
form_clientform.filteron = true
DoCmd.openform "clientform"


Jeff said:
Jessica, The "Client Form" your talking about. Sounds to me like you want a
form to "pop-up" with the correct information already filled in the fields.
But your implying the form has a drop-down combo list from which to select
client information from. If you want this "Client form" to "pop-up" with the
correct information, then just place text fields in the client form, make
sure the record source for the form points to the client table, and that all
text fields point to a field in the table, then in the "search form" in the
on-click event for the search button, put the filter code I stated earlier.
Make sure the filter code information is filled out with the correct control
names of your text fields and such.

Hope this helps, if not then give more information about the "client form"

/Jeff
Are you sure this is going to work. Do i put in this in the Search form or
the client form. What i have is a Search form where i have client id and last
[quoted text clipped - 10 lines]
 
I think i'm not being clear. This is what i have: I have a DATA ENTRY Form
where i have a search commond button. If i click on it and it takes me to
the SEARCH FORM where i can search by creterias(ClientID or Name) In this
form i also want to have a search commond button that takes me to the CLIENT
FORM (to which some of the fields are client id, last name, and first name)
but i need it to take me to the exact record i enter in the search form. How
can i make to go to the exact record. SO when i click on the search common
button on the search form i want it to take me to the client form but to the
exact record .


Jeff O via AccessMonster.com said:
Jessica, To be sure you understand the filter code let me explain it.
the "clientform" as stated in the code represents the name of your client
form (NOT the search form)
(F.Y.I - can set another forms properties from a different form)
"LastName" represents the Primary Key field in your "client" table that your
"client" form points to.
Me.ClientId.Value the the current value of the "Client ID" selected from your
"search form" that is passed to the filter code.

So you need to make sure that everytrhing is correct here. OK (-:

/Jeff



form_clientform.filter = "[Lastname] = '" & Me.ClientID.Value & "'"
form_clientform.filteron = true
DoCmd.openform "clientform"


Jeff said:
Jessica, The "Client Form" your talking about. Sounds to me like you want a
form to "pop-up" with the correct information already filled in the fields.
But your implying the form has a drop-down combo list from which to select
client information from. If you want this "Client form" to "pop-up" with the
correct information, then just place text fields in the client form, make
sure the record source for the form points to the client table, and that all
text fields point to a field in the table, then in the "search form" in the
on-click event for the search button, put the filter code I stated earlier.
Make sure the filter code information is filled out with the correct control
names of your text fields and such.

Hope this helps, if not then give more information about the "client form"

/Jeff
Are you sure this is going to work. Do i put in this in the Search form or
the client form. What i have is a Search form where i have client id and last
[quoted text clipped - 10 lines]
What do i need to do
 
Back
Top