473,326 Members | 2,061 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Difficult Question Access 2000 Litwin Gibert and Getz book

Bob
Hi Everybody

Difficult question

Has anyone else used the "Using the Tab control as a container"
database example that comes with the above book chapter 7 on the
accompanying disc. It is a brilliant piece of design that I have used
in 2 previous projects and they have worked beautifully.

What it does is set up the tabs in a container with a different tab
for each different record in a particular field.

For example in a table of International Addresses there is a field
called "Country",
So for each different country it sets up a tab which filters the
records on the sub form to assign each record to its own country tab.

The only 2 setting you need t use in your application is to change the
code behind the form from

Table = Customers
Control = Country

I have adapted this into my own application and changed these 2 fields
to

Table = ztblProduct (Which is on a sub form)
Control =Category (Power Tool, Hand tool, Workbench etc)

That works fine. Now a step further

I have replaced ztblProduct with zqryProduct (a query) as the source
for the sub form zfrmProduct.

In zqryProduct I have the SupplierID field picking up the SupplierID
from the already open Supplier form. But no matter which way I swing
it there is always the "too few parameters error".

Strangely, it does work if you actually remove the expression from the
query zqryProduct and just put the supplierID manually, but I want it
to work dynamically, and after 5 head scratching hours I'm losing
heart.

Can anyone help

Thanks in Advance

Smiley Bob

Nov 12 '05 #1
5 1439
From first principles: they have grouped the records onto
tabs: they have grouped the records, they have grouped...

Grouping does not work on calculated fields: you get a
"too few parameters error".

Create a NEW query that only selects from your base query:
"SELECT * FROM myQuery"
and use that in zqryProduct.

New query has no calculated fields: Grouping works: tab
example works.

(david)
"Bob" <sm*******@hotmail.com> wrote in message
news:gv********************************@4ax.com...
Hi Everybody

Difficult question

Has anyone else used the "Using the Tab control as a container"
database example that comes with the above book chapter 7 on the
accompanying disc. It is a brilliant piece of design that I have used
in 2 previous projects and they have worked beautifully.

What it does is set up the tabs in a container with a different tab
for each different record in a particular field.

For example in a table of International Addresses there is a field
called "Country",
So for each different country it sets up a tab which filters the
records on the sub form to assign each record to its own country tab.

The only 2 setting you need t use in your application is to change the
code behind the form from

Table = Customers
Control = Country

I have adapted this into my own application and changed these 2 fields
to

Table = ztblProduct (Which is on a sub form)
Control =Category (Power Tool, Hand tool, Workbench etc)

That works fine. Now a step further

I have replaced ztblProduct with zqryProduct (a query) as the source
for the sub form zfrmProduct.

In zqryProduct I have the SupplierID field picking up the SupplierID
from the already open Supplier form. But no matter which way I swing
it there is always the "too few parameters error".

Strangely, it does work if you actually remove the expression from the
query zqryProduct and just put the supplierID manually, but I want it
to work dynamically, and after 5 head scratching hours I'm losing
heart.

Can anyone help

Thanks in Advance

Smiley Bob

Nov 12 '05 #2
Bob
On Tue, 11 May 2004 13:28:58 +1000, "david epsom dot com dot au"
<david@epsomdotcomdotau> wrote:
From first principles: they have grouped the records onto
tabs: they have grouped the records, they have grouped...

Grouping does not work on calculated fields: you get a
"too few parameters error".

Create a NEW query that only selects from your base query:
"SELECT * FROM myQuery"
and use that in zqryProduct.

New query has no calculated fields: Grouping works: tab
example works.

(david)
Hi David

Thanks for your help

Like you suggested I have created a new Query with just 2 fields to
set up the tabs.

zqrySupplierProductSort
field 1 = SupplierID (Criteria = [Forms]![frmSupplier]![SupplierID])
field2 = SupplierCategory

In the code behind the form:
Private Const adhcTable = "zqrySupplierProductSort"
Private Const adhcFieldName = "SupplierCategory"

But still " too few parameters"

BTW I have tried this with the "zqrySupplierProductSort" running in
the background but not joy there either.

I am missing some fundemental point I think.

Regards Smiley Bob


"Bob" <sm*******@hotmail.com> wrote in message
news:gv********************************@4ax.com.. .
Hi Everybody

Difficult question

Has anyone else used the "Using the Tab control as a container"
database example that comes with the above book chapter 7 on the
accompanying disc. It is a brilliant piece of design that I have used
in 2 previous projects and they have worked beautifully.

What it does is set up the tabs in a container with a different tab
for each different record in a particular field.

For example in a table of International Addresses there is a field
called "Country",
So for each different country it sets up a tab which filters the
records on the sub form to assign each record to its own country tab.

The only 2 setting you need t use in your application is to change the
code behind the form from

Table = Customers
Control = Country

I have adapted this into my own application and changed these 2 fields
to

Table = ztblProduct (Which is on a sub form)
Control =Category (Power Tool, Hand tool, Workbench etc)

That works fine. Now a step further

I have replaced ztblProduct with zqryProduct (a query) as the source
for the sub form zfrmProduct.

In zqryProduct I have the SupplierID field picking up the SupplierID
from the already open Supplier form. But no matter which way I swing
it there is always the "too few parameters error".

Strangely, it does work if you actually remove the expression from the
query zqryProduct and just put the supplierID manually, but I want it
to work dynamically, and after 5 head scratching hours I'm losing
heart.

Can anyone help

Thanks in Advance

Smiley Bob


Nov 12 '05 #3
Bob
On Tue, 11 May 2004 08:28:16 +0100, Bob <sm*******@hotmail.com> wrote:

Hi david

I have done some experimenting, and your 1st post contained the reason
why this does not work. You can't group on a calculated field.

If I manually put the supplierID number in by hand, the tabs get set
set up grouped in the way I want.

The problems only come when I try to do this with the query
Criteria = [Forms]![frmSupplier]![SupplierID] .... No Go! Even when I
put that query as the data source for another query to be the tab set
up query.

At the moment I've put it aside and am using a combo box to sort the
records, but it would be nice...........

Anyway, Thanks for pinpointing what the problem was.

Regards Smiley Bob

On Tue, 11 May 2004 13:28:58 +1000, "david epsom dot com dot au"
<david@epsomdotcomdotau> wrote:
From first principles: they have grouped the records onto
tabs: they have grouped the records, they have grouped...

Grouping does not work on calculated fields: you get a
"too few parameters error".

Create a NEW query that only selects from your base query:
"SELECT * FROM myQuery"
and use that in zqryProduct.

New query has no calculated fields: Grouping works: tab
example works.

(david)


Hi David

Thanks for your help

Like you suggested I have created a new Query with just 2 fields to
set up the tabs.

zqrySupplierProductSort
field 1 = SupplierID (Criteria = [Forms]![frmSupplier]![SupplierID])
field2 = SupplierCategory

In the code behind the form:
Private Const adhcTable = "zqrySupplierProductSort"
Private Const adhcFieldName = "SupplierCategory"

But still " too few parameters"

BTW I have tried this with the "zqrySupplierProductSort" running in
the background but not joy there either.

I am missing some fundemental point I think.

Regards Smiley Bob


"Bob" <sm*******@hotmail.com> wrote in message
news:gv********************************@4ax.com. ..
Hi Everybody

Difficult question

Has anyone else used the "Using the Tab control as a container"
database example that comes with the above book chapter 7 on the
accompanying disc. It is a brilliant piece of design that I have used
in 2 previous projects and they have worked beautifully.

What it does is set up the tabs in a container with a different tab
for each different record in a particular field.

For example in a table of International Addresses there is a field
called "Country",
So for each different country it sets up a tab which filters the
records on the sub form to assign each record to its own country tab.

The only 2 setting you need t use in your application is to change the
code behind the form from

Table = Customers
Control = Country

I have adapted this into my own application and changed these 2 fields
to

Table = ztblProduct (Which is on a sub form)
Control =Category (Power Tool, Hand tool, Workbench etc)

That works fine. Now a step further

I have replaced ztblProduct with zqryProduct (a query) as the source
for the sub form zfrmProduct.

In zqryProduct I have the SupplierID field picking up the SupplierID
from the already open Supplier form. But no matter which way I swing
it there is always the "too few parameters error".

Strangely, it does work if you actually remove the expression from the
query zqryProduct and just put the supplierID manually, but I want it
to work dynamically, and after 5 head scratching hours I'm losing
heart.

Can anyone help

Thanks in Advance

Smiley Bob


Nov 12 '05 #4
> No Go! Even when I put that query as the data source for
another query to be the tab set up query.
When all else fails.... create a table to write the criteria to.
Update the criteria table as required.

(david)

"Bob" <sm*******@hotmail.com> wrote in message
news:9m********************************@4ax.com... On Tue, 11 May 2004 08:28:16 +0100, Bob <sm*******@hotmail.com> wrote:

Hi david

I have done some experimenting, and your 1st post contained the reason
why this does not work. You can't group on a calculated field.

If I manually put the supplierID number in by hand, the tabs get set
set up grouped in the way I want.

The problems only come when I try to do this with the query
Criteria = [Forms]![frmSupplier]![SupplierID] .... No Go! Even when I
put that query as the data source for another query to be the tab set
up query.

At the moment I've put it aside and am using a combo box to sort the
records, but it would be nice...........

Anyway, Thanks for pinpointing what the problem was.

Regards Smiley Bob

On Tue, 11 May 2004 13:28:58 +1000, "david epsom dot com dot au"
<david@epsomdotcomdotau> wrote:
From first principles: they have grouped the records onto
tabs: they have grouped the records, they have grouped...

Grouping does not work on calculated fields: you get a
"too few parameters error".

Create a NEW query that only selects from your base query:
"SELECT * FROM myQuery"
and use that in zqryProduct.

New query has no calculated fields: Grouping works: tab
example works.

(david)


Hi David

Thanks for your help

Like you suggested I have created a new Query with just 2 fields to
set up the tabs.

zqrySupplierProductSort
field 1 = SupplierID (Criteria = [Forms]![frmSupplier]![SupplierID])
field2 = SupplierCategory

In the code behind the form:
Private Const adhcTable = "zqrySupplierProductSort"
Private Const adhcFieldName = "SupplierCategory"

But still " too few parameters"

BTW I have tried this with the "zqrySupplierProductSort" running in
the background but not joy there either.

I am missing some fundemental point I think.

Regards Smiley Bob


"Bob" <sm*******@hotmail.com> wrote in message
news:gv********************************@4ax.com. ..
Hi Everybody

Difficult question

Has anyone else used the "Using the Tab control as a container"
database example that comes with the above book chapter 7 on the
accompanying disc. It is a brilliant piece of design that I have used
in 2 previous projects and they have worked beautifully.

What it does is set up the tabs in a container with a different tab
for each different record in a particular field.

For example in a table of International Addresses there is a field
called "Country",
So for each different country it sets up a tab which filters the
records on the sub form to assign each record to its own country tab.

The only 2 setting you need t use in your application is to change the
code behind the form from

Table = Customers
Control = Country

I have adapted this into my own application and changed these 2 fields
to

Table = ztblProduct (Which is on a sub form)
Control =Category (Power Tool, Hand tool, Workbench etc)

That works fine. Now a step further

I have replaced ztblProduct with zqryProduct (a query) as the source
for the sub form zfrmProduct.

In zqryProduct I have the SupplierID field picking up the SupplierID
from the already open Supplier form. But no matter which way I swing
it there is always the "too few parameters error".

Strangely, it does work if you actually remove the expression from the
query zqryProduct and just put the supplierID manually, but I want it
to work dynamically, and after 5 head scratching hours I'm losing
heart.

Can anyone help

Thanks in Advance

Smiley Bob

Nov 12 '05 #5
Bob
On Thu, 13 May 2004 09:40:59 +1000, "david epsom dot com dot au"
<david@epsomdotcomdotau> wrote:
No Go! Even when I put that query as the data source for
another query to be the tab set up query.


When all else fails.... create a table to write the criteria to.
Update the criteria table as required.

(david)


Thanks David.

I shall duck out of the wife's shopping trip this Saturday and spend
some time at home to try and put that one into action.

Regards Smiley Bob
Nov 12 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Uttam | last post by:
Hello, I am using the code from Chapter 17 specifically the code from the font frmListFonts in my application. I have taken care to copy all the relevant modules / class modules into the...
7
by: Mark Lees | last post by:
How does one increase their Access skills? I'm creating a basic DB for a non-profit organization. I would classify myself as an advanced beginner. I've got some help books but it seems they...
1
by: Adonis Walmsley-McCarthy | last post by:
Hello all, I have been asked to design a database in MS Access 2000. One of the requirements is that there is a calendar that displays its data in the form of a timeline. Would an ActiveX...
2
by: Galina | last post by:
Hello I have a very complex database application, which have been working fine for several years in Access 97. Now I had to convert it into Access 2000. The main form (course) has got 2 subforms....
0
by: Frederick Noronha \(FN\) | last post by:
---------- Forwarded message ---------- Solutions to Everyday User Interface and Programming Problems O'Reilly Releases "Access Cookbook, Second Edition" Sebastopol, CA--Neither reference book...
3
by: Big Time | last post by:
I'm looking into buying a book to learn Access VBA programming. I am very familiar with Access however I am new to programming Access with VBA. Are there any recommendations for books for...
1
by: Olav.Net | last post by:
I need to do something in Access, and would like to get good books to get me started. As I am a professional C++/.NET developer, I think it would have to be relatively "intense" compared to most...
1
by: i8mypnuts | last post by:
Could someone please help? I am using the 'defaultprt.zip' tool provided by Ken Getz to change the default printer via VBA code (code below). My problem is that once the default printer has been...
1
by: gm | last post by:
Hi; I have written a database that tracks all the installation we have ever done. I have a small heating company. I have recently started keeping a directory of digital photographs of the...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.