Table in a form

  • Thread starter Thread starter Little Penny
  • Start date Start date
L

Little Penny

I have several dcount queries which have there values displayed in a form. I would like to create a cmd button the will that will show the details of
the count. In other words the results of the record in that particular query (table). So I created a sub form based on the query to view as a table.
When all is said and done, I will need a details button for about 20 to 25 different queries. Is it possible to create a cmd button that will use a
specific query as its record set.

This is what I have no. I trying to avoid make 25 different forms for each cmd button when they all will basically use the same form.

This is an example of what if have now

Private Sub cmdW2K_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
DoCmd.OpenForm "ListW2K", acNormal
End Sub

Is this possible and if so how. And can I assign the caption of the form ion VB.


Thanks
 
I believe I understand your explanation. What I'm not clear on is what you
are trying to accomplish. I can follow the "how" of what you are doing, but
I'm asking about the "why". If you didn't already have this approach
identified, and if you were explaining the underlying business need to a
87-year old grandmother, how would you describe it?

I'm asking because there may be an alternate approach that doesn't require
creating multiple subforms...

--
Regards

Jeff Boyce
<Office/Access MVP>

Little Penny said:
I have several dcount queries which have there values displayed in a form.
I would like to create a cmd button the will that will show the details of
the count. In other words the results of the record in that particular
query (table). So I created a sub form based on the query to view as a
table.
When all is said and done, I will need a details button for about 20 to 25
different queries. Is it possible to create a cmd button that will use a
specific query as its record set.

This is what I have no. I trying to avoid make 25 different forms for each
cmd button when they all will basically use the same form.
 
Hope I've given enough information for you to help...


This database is to keep track of an upgrade project from 2000 to XP. As well, as upgrades of some additional criteria. There are over 1500
workstation in a domain environment in 15 different buildings. The naming convention for computer names includes building number and room number. Our
system administrator run an SMS scan to query all computers on domain to gather required information and imports that into an excel spread sheet and
gives it to me. I tweak the spreadsheet and import into database. In the database I created a form for the top-level management to open and see the
breakdown of whats deployed by (operation system and building), (operation system, building and RAM) and so on. So they can see dynamically as to the
progress of the upgrade project. For instance in the breakdown by operating system form I had to make 35 plus different queries as to have the dcount
give the specific number based on that query. In addition there are times when they wanted to see the data. So for look purpose I created a blank form
and put a subform inside and use a query as the source object to view as a table. This way they can look at the data that make up a particular
dcount..

I would like to have a cmd button for each dcount on the form (36). In order for me to do that I need to create 36 forms with a subform and point the
cmd button to open that form in VB.

Since all the queries display the same field names I what to create additional cmd buttons for each query. I also want to create a form that has the
get it source object from the VB code. Which will be the queries I've already created. Otherwise, I need 36 different forms.


Thanks
 
I don't think an 87 year old would understand... <g>

(see comments in-line below)

Little Penny said:
Hope I've given enough information for you to help...


This database is to keep track of an upgrade project from 2000 to XP. As
well, as upgrades of some additional criteria. There are over 1500
workstation in a domain environment in 15 different buildings.

So, for entities you have workstations, and you have buildings.
The naming convention for computer names includes building number and room
number.

Does this mean you only have one computer per building/room number?
Our system administrator run an SMS scan to query all computers on domain
to gather required information and imports that into an excel spread sheet
and
gives it to me. I tweak the spreadsheet and import into database.

?Intact? Or are you importing "flat" ss data into a relational (Access)
table structure? How you do what you're asking will depend on your table
structure and how well-normalized your data is.
In the database I created a form for the top-level management to open and see the
breakdown of whats deployed by (operation system and building), (operation
system, building and RAM) and so on.

Does this mean you have set, determined breakdown calculations, or are you
giving them free rein to search? How are you determining the breakdowns?
Is this the "dcount()" question you posed?
So they can see dynamically as to the
progress of the upgrade project. For instance in the breakdown by
operating system form I had to make 35 plus different queries as to have the
dcount
give the specific number based on that query.

Not seeing your data structure, I have no idea why you have dcount() and
queries combined 35 different ways. Are you saying you are using a
different FORM for each possible combination? You made 35 plus different
queries to get "the specific number based on that query" (somehow involving
dcount()). I don't understand what you're doing here.
In addition there are times when they wanted to see the data. So for look purpose I created a blank form
and put a subform inside and use a query as the source object to view as a
table. This way they can look at the data that make up a particular

You keep mentioning "dcount()". I can't see your forms or your data or your
queries, so I can't tell how/why you are using dcount(). This goes back to
the "grandmother" explanation...
I would like to have a cmd button for each dcount on the form (36).

?36? 36 what? Are you saying there are 36 different possible combinations
of attributes (operating system, RAM, etc.) that you want to display the
status for?
In order for me to do that I need to create 36 forms with a subform and point the
cmd button to open that form in VB.

Until I have a better picture of what you are putting into 36 different
forms, and an idea of how your data is structured, it's tough to offer
suggestions for how to achieve ... something?!
Since all the queries display the same field names I what to create
additional cmd buttons for each query. I also want to create a form that has
the
get it source object from the VB code. Which will be the queries I've
already created. Otherwise, I need 36 different forms.

Sorry, maybe I haven't had enough caffiene yet today. I'm just not getting
it. Perhaps one of the other newsgroup readers have a sense of where you
are trying to go with this. I don't.

I'll ask again, can you lay out where you want to get to without reference
to "how" you've already been trying to get there? (grandma, she's not very
computer literate, and certainly doesn't understand Access).

Hmmm?! Come to think of it, you wouldn't want to explain what you're doing
the way you have if you were explaining to "the bosses", would you? What's
important to them?
 
Back
Top