setfocus to 1st tab after requery on 2nd tab

G

Guest

Hello,

I have the following puzzle.
I have a fill in form, consisting of two tabs. On open, I want focus on the
first tab.
On the 2nd tab an item can be selected from a listbox. If the item does not
exist, it can be created by clickin on a button. This button opens an other
form. After the creation of the item, this form will close thus going back to
the 2nd tab, which showes the newly created item (Me.lstBLABLA.requery)
The problem is that I first tell the form to setfocus on tab1 and after
creating an item, I need it to focus on tab2.
 
G

Guest

Set the focus to one of the text boxes that are located in Tab2, after the
requery

Me.[TextBoxName].SetFocus
 
G

Guest

THis is exactly where I have the problem. When I already have told the form
to open with a setfocus on tab1,,,,how can I tell it focus on a text box on
tab2 after I inserted an item.
When de form opens again, in which Event field other then "On open" can I
tell the bform to focus not on tab1, but now on tab2. Because when the form
is being activated again, the "on open" event also fires again. (put two
setfocus in it and the last one is valid)

--
Marco Roskam


Ofer Cohen said:
Set the focus to one of the text boxes that are located in Tab2, after the
requery

Me.[TextBoxName].SetFocus

--
Good Luck
BS"D


Madcap said:
Hello,

I have the following puzzle.
I have a fill in form, consisting of two tabs. On open, I want focus on the
first tab.
On the 2nd tab an item can be selected from a listbox. If the item does not
exist, it can be created by clickin on a button. This button opens an other
form. After the creation of the item, this form will close thus going back to
the 2nd tab, which showes the newly created item (Me.lstBLABLA.requery)
The problem is that I first tell the form to setfocus on tab1 and after
creating an item, I need it to focus on tab2.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top