Pages on a Main Form

  • Thread starter Thread starter Harper
  • Start date Start date
H

Harper

Help Please, I have a main form that has a [combo25]
containing a list with ID Numbers on the form I have
attached a tab control with ten pages. I would like,
when selecting a tab - say the tab is named "cash" that
the [combo25] on the main form changes indicating a
particular ID number - say 12.

I have been able to do this with a macro on mouse down,
but I would prefer using the event procedure module VB.
I am using Access 2000.

Thanks in advance.

jc
 
Okay Allen, I am a fairly new user, I found Change event
on the tab control. how do I set the value of the combo
box? As I said I would like the value in the combo box
to change to number 2 when I select one of the pages that
is named "Cash".

jc
-----Original Message-----
Use the Change event of the Tab control, to set the value of the combo.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Help Please, I have a main form that has a [combo25]
containing a list with ID Numbers on the form I have
attached a tab control with ten pages. I would like,
when selecting a tab - say the tab is named "cash" that
the [combo25] on the main form changes indicating a
particular ID number - say 12.

I have been able to do this with a macro on mouse down,
but I would prefer using the event procedure module VB.
I am using Access 2000.

Thanks in advance.

jc


.
 
1. Set the On Change property of the tab control to:
[Event Procedure]

2. Click the Build button (...) beside this.
Access opens the code window.

3. Paste these 3 lines between the other two:

Private Sub MyTab_Change()
If Me.[MyTab].Value = Me.[Cash].PageIndex Then
Me.[MyCombo] = 2
End If
End Sub

That assumes:
- the tab control is named "MyTab".
- the Page is named "Cash"
- the Combo is named "MyCombo"

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Harper said:
Okay Allen, I am a fairly new user, I found Change event
on the tab control. how do I set the value of the combo
box? As I said I would like the value in the combo box
to change to number 2 when I select one of the pages that
is named "Cash".

jc
-----Original Message-----
Use the Change event of the Tab control, to set the value of the combo.


Help Please, I have a main form that has a [combo25]
containing a list with ID Numbers on the form I have
attached a tab control with ten pages. I would like,
when selecting a tab - say the tab is named "cash" that
the [combo25] on the main form changes indicating a
particular ID number - say 12.

I have been able to do this with a macro on mouse down,
but I would prefer using the event procedure module VB.
I am using Access 2000.

Thanks in advance.
 
Back
Top