update combobox in tabctrl multipage.

M

MarMo

Helle there ,

Let me first explain the form's layout.

On a form i have a tabcontrol with several pages.
I have a form FrmDestinations that i placed on Page2 as a
subform.(recordsource = TblDestinations)
Here i've added 2 cmdbuttons , 1 to add a record , 1 to delete a record.
All works fine

On Page3 i 've got a combobox with the TblDestinations as a rowsource.
I'd like to update the combobox in Page3 after I added or deleted a record
in Page2

PROBLEM IS :
If I delete a record , the combobox has '#deleted' as text where the record
used to be.
i've tried :
Forms!FrmMain.Pages("PgDestinations").controls("combobox1").requery

but this does not help.
I also looked for help on the net , but could not find exactly what i
needed.

Can someone help me with this pls.
If you need more details , just ask for it.
Many thanks
Mario
 
Q

Queezy

Helle there ,

Let me first explain the form's layout.

On a form i have a tabcontrol with several pages.
I have a form FrmDestinations that i placed on Page2 as a
subform.(recordsource = TblDestinations)
Here i've added 2 cmdbuttons , 1 to add a record , 1 to delete a record.
All works fine

On Page3 i 've got a combobox with the TblDestinations as a rowsource.
I'd like to update the combobox in Page3 after I added or deleted a record
in Page2

PROBLEM IS :
If I delete a record , the combobox has '#deleted' as text where the record
used to be.
i've tried :
Forms!FrmMain.Pages("PgDestinations").controls("combobox1").requery

but this does not help.
I also looked for help on the net , but could not find exactly what i
needed.

Can someone help me with this pls.
If you need more details , just ask for it.
Many thanks
Mario

The .Pages part of your statement, actually gave me an error.
I got it to work with just combobox1.requery
 
Q

Queezy

Helle there ,

Let me first explain the form's layout.

On a form i have a tabcontrol with several pages.
I have a form FrmDestinations that i placed on Page2 as a
subform.(recordsource = TblDestinations)
Here i've added 2 cmdbuttons , 1 to add a record , 1 to delete a record.
All works fine

On Page3 i 've got a combobox with the TblDestinations as a rowsource.
I'd like to update the combobox in Page3 after I added or deleted a record
in Page2

PROBLEM IS :
If I delete a record , the combobox has '#deleted' as text where the record
used to be.
i've tried :
Forms!FrmMain.Pages("PgDestinations").controls("combobox1").requery

but this does not help.
I also looked for help on the net , but could not find exactly what i
needed.

Can someone help me with this pls.
If you need more details , just ask for it.
Many thanks
Mario

I'm sorry, disregard my last post, I didn't have FrmDestinations as a
subform.
This is what I really wanted to say -
Forms![FrmMain]![combobox1].Requery
 
M

missinglinq via AccessMonster.com

Got dizzy reading this, but I think

Forms!FrmMain.combobox1.requery

will do the job. The secret to working with tabbed pages is understanding
that the tabs are just extensions, if you will, of the form. Because of this,
you refer to controls as if they all appeared on a single screen. There is no
nee to refer to the tabbed page when referencing them.
 
M

Mario

He guys ,

I know the explanation was not easy , but your answers did the trick.

Many thanks
Mario
 

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