refresh list box-very important for me

F

Florin

I have a form with a list box with list of orders and a subform with orders
products.
I want modify orders (modify amount, deleted product),
but that changes not appears immediately in my subform; it's necessary
to make click at subform for actualisation.
Where and how I use requery command for actualization immediately?

For change amount, I use another form where I task new amount.
How I get focus at main form for use command requery ?

Thanks very much!!
 
G

Guest

Hi Florin, try this


Private Sub MainFormControl_AfterUpdate()
Forms!MainFormName!SubformName!ListName.Requery
End Sub


Note
You should look for the "SubformName" by opening the Main Form in design
view - click the edge of the subform - the name will be shown in the
properties box.
This may be different from the control source you have selected for the sub
form.
 
F

Florin

Thanks , Wayne
I am very happy, I try and it's ok.

Tell me please, exist a solution for "freeze" a form in a single place and
with a
fix size ?
For my example, If precedence form is maximized (Form1), a form to open
immediate after Form1 is maximized,
indifferently as properties settings at format form.

I hope understand , my English language is very bad.

Thans for all

Florin
Bucharest , Roumanie
 
G

Guest

Hi Florin

I think you have a form (form1) that is maximised and you want to open
another form (form 2) also maximised.

If it was me doing this I would have a button on form 1 to open the next
form (form 2) and then to close form 1

Next I would reverse this when form 2 was closed.

Open form 1 in design view.
Create a button and put this code on the OnClick event

Private Sub ButtonName_Click()
DoCmd.OpenForm "Form2", acNormal, "", "", , acNormal
DoCmd.Close acForm, "Form1"
End Sub

Next open form 2 in design view and put another button here

Private Sub ButtonName_Click()
DoCmd.OpenForm "Form1", acNormal, "", "", , acNormal
DoCmd.Close acForm, "Form2"
End Sub

Change the form name and the button names in the codes above.

I have assumed that both forms are "popups" so you need to close and open
the forms to make things better.

Oh and don't worry about English - it's a mad langiage but it's not too hard
to learn after you have the basics.
 
F

Florin

Hi,
My problem is size of opened form (windows)
How can I find dimension of windows (left,right,up, down)

I can use
docmd.movesize( ) , but I don't now values for right, width......

Florin
Bucharest , Roumanie
 

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

Similar Threads


Top