Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Want a feature similar to page numbering such as "1 of 4" 1

Status
Not open for further replies.

hlubpc09

Technical User
Jan 13, 2009
10
Some customers would send us 10 samples at a time. I have a fieldname in the database to store the number of samples send as numeric. How do I write the code so that it'll display as "sample 1 of 10", "sample 2 of 10", etc.

thank you.
 
Maybe you provide a little more information and show what you have started.
 
Dhookom

the link you provide works ok; however, it is for the same customer with the same type of style#, color, size, etc. in my case, i may received 10 items from the same customer and each of the items have to have its own unique test#; yet, i have to keep them as a group. That was why I need the '1 of 10', etc.

is there another way?

I was thinking of adding a yes/no checkbox on the form. as the order entry person enters the orders; he/she can check the checkbox if it's in the same group. If this idea work, where or how do i keep track/count of the number of items on the same group?

thanks
 
Please take the time to enter some significant data into a posting as well as the desired display and reason. You can use TGML tags [ignore][tt] and [/tt][/ignore] to get your data to display spaced correctly in columns.

Duane
Hook'D on Access
MS Access MVP
 
ok. on a 2 X 4 Avery label

Example:

[tt]Test No: 1234[/tt]* [tt]Start Date: 1/22/09[/tt]
[tt]Customer: ABC[/tt] [tt]Size: 7-8 [/tt]*
[tt]color: Dark brown[/tt]*
[tt]Style: 2133[/tt]*
[tt]Description: test sock[/tt]*

1 of 3 (would like to have this done; group sample 1 of 3, 2 of 3, etc)

*will be different for all 3 sample; customer and start date will be the same.

thank you
 
You could possibly add a column/subqueries in your report's record source to calculate the sample number. This would be something like:
Code:
GrpSeq:(SELECT Count(*) FROM ... A WHERE A.Customer = ....Customer AND A.[StartDate] = ....[StartDate] AND A.[TestNo]<=....[TestNo])


Duane
Hook'D on Access
MS Access MVP
 
thank you for trying to help me.

here's my modification of your code:
=(SELECT Count(*) FROM [tbl Data Log2]
WHERE [tbl Data Log2.Customer] = [Customer] AND [tbl Data Log2.Start Date] = [Start Date] AND [tbl Data Log2.Test No]<=[Test No])

add it to to the query.

RESULT: it has 3889 as expr1 as header of which it should only be 16 record.

when i add it to the report; it has "#name?".

see link below for my query. Because I prompt the user to enter a beginning test no and an ending test no; how do i capture it?

from your code; do i also prompt user to enter customer? start date?

thanks again.
 
 http://www.hosetech.com/number-range.jpg
I stated "add a column/subqueries in your report's record source". This was not in a control source on your report. Basically I believe you need a "ranking" subquery in your main query that creates the sequence numbers. Your subquery may also need to reference the date range in its criteria.

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top