Display in subform insted of popup-table ?

S

SpookiePower

I have a mainform with two subforms on that shows all
about a customer. I have now made a Dialogbox with a
combobox where I can choose to see all the customers
from the 12 different months. The result is being displayed
in a "pop-up-table-window" using this code -

DoCmd.OpenQuery "queMonth", acViewNormal, acEdit

Insted of this "pop-up-table-window" I want the result to
be showed in a subform on my mainform.

Is it possible ?? And how can I do it ?
 
G

Guest

Make your query queMonth the record source for the sub form. Make Allow
Edits and Allow Additions false.
 
S

SpookiePower

Klatuu said:
Make your query queMonth the record source for the sub form. Make Allow
Edits and Allow Additions false.

Thanks...but I have a few questions.

I'm not sure about how to set Record Source for the subform.
I think I understand this all wrong, but if you look at my screencap -
http://www.activewebsite.dk/download/access.jpg
I do not have a Record Source-property for my subform, only
a Source Object.

And where do I set Edits/Additions false ?
Again I can't see any of those two propertys in my subform, but maybe
thats not where they are to be set.

Thanks again for your help.



www.photo.activewebsite.dk
 
G

Guest

What you show in your screencap is the reference to the subform, not the
subform itself. The SourceObject should be the name of the subform. In the
subform itself, you should have the name of the query as the recordsource.
 
S

SpookiePower

Klatuu said:
What you show in your screencap is the reference to the subform, not the
subform itself. The SourceObject should be the name of the subform. In the
subform itself, you should have the name of the query as the recordsource.


Ok. This problem I have had before.

So I have to pick the subform itself....but where is it ?. As you just told me,
I can only find the reference to it.

Hope not that I ask to many stupid questions.
 
S

SpookiePower

Klatuu said:
You have to create a subform just like you do any other form.


So what I belived was a subform, is just a "box" where I can
put a subform into ?
 
G

Guest

Sort of, but not exactly. It specifies the location of the the subform and
has some properites that identify the subform. You size the box to what you
want the sub form to be. If you will notice when you click the subform
control and place it on your form, it will ask you if you want to use an
existing form or create one. If you don't already have a sub form, you can
create it at that time. If you have already created the subform, then you
can give it the name of the existing subform and it will include that form as
it's subform. So, the box is just a reference to a subform.
 

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