Go Back   Access World Forums > Microsoft Access Discussion > Queries

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 09-18-2019, 04:02 AM   #1
murray83
sega collector
 
Join Date: Mar 2017
Location: Daventry, UK
Posts: 436
Thanks: 102
Thanked 1 Time in 1 Post
murray83 is on a distinguished road
help with selecting one number for multi

Afternoon All from sunny UK

please first find attached my example DB, and now my request for a little help

pictures number1, number2 & number3 should in an ideal world should just be number1 but the reason i believe im getting extra sheets is due to them having there own SMS Number, that's the number at the top which starts DA then followed by 6 numbers

my question is, how ( the hell ) do i have it set the same SMS Number based on PO so that rather then 4 sheets i only have 2

all help much appreciated
Attached Images
File Type: jpg number3.jpg (47.3 KB, 20 views)
File Type: jpg number2.jpg (48.7 KB, 18 views)
File Type: jpg number1.jpg (52.0 KB, 19 views)
Attached Files
File Type: zip example for upload.zip (1.13 MB, 11 views)

murray83 is offline   Reply With Quote
Old 09-22-2019, 04:42 AM   #2
Gasman
Enthusiastic Amateur
 
Join Date: Sep 2011
Location: Swansea, South Wales,UK
Posts: 4,114
Thanks: 422
Thanked 753 Times in 731 Posts
Gasman has a spectacular aura about Gasman has a spectacular aura about Gasman has a spectacular aura about
Re: help with selecting one number for multi

I'll put my hand up and own up. I have no clue as to what you are asking.?

Possibly why all those views and no response?

You have 3 records for that PO number and each has it's own SMS number.

So where does 4 sheets (I presume pages) come from.?

Just what are you trying to achieve.?

Also it would help if you would tell people how to get to what you are showing rather than having them dig around trying to work out the logic/process.?

If you want people to help you, you have to help them.
__________________
Access novice. Sometimes trying to give something back.
Access 2007

Please, please use code tag # when posting code snippets

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Gasman is offline   Reply With Quote
Old 09-22-2019, 09:10 AM   #3
arnelgp
error reading drive A:
 
arnelgp's Avatar
 
Join Date: May 2009
Location: somewhere out there
Posts: 8,488
Thanks: 68
Thanked 2,723 Times in 2,608 Posts
arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice
Re: help with selecting one number for multi

see this one. the resize text to textbox is only
available in Print Preview of the report.
Attached Files
File Type: zip example for upload.zip (1.05 MB, 6 views)

__________________
"Never stop learning, because life never stops teaching"
arnelgp is offline   Reply With Quote
The Following User Says Thank You to arnelgp For This Useful Post:
murray83 (09-23-2019)
Old 09-22-2019, 01:39 PM   #4
Pat Hartman
Super Moderator
 
Join Date: Feb 2002
Location: Stratford,Ct USA
Posts: 28,165
Thanks: 15
Thanked 1,577 Times in 1,499 Posts
Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all
Re: help with selecting one number for multi

When records are "doubled", look to the query and determine if the join is correct. If there are only two tables in the join then both table1 and table2 have 2 records with the same value in the join field. You can check this easily enough by searching each table for the key value. If the join has more than two tables, you probably have two independent relationships. For example. You have a student table, a class table and a pets table. All three tables include StudentID so it may seem that you should be able to include the three tables in the same query. You can't because class and pets may be related to the same student but they are not related to each other. You'll end up with:
Sam, Math, Spot
Sam, Math, Blinky
Sam, Writing, Spot
Sam, Writing, Blinky
__________________
Bridge Players Still Know All the Tricks
Pat Hartman is online now   Reply With Quote
Old 09-23-2019, 01:52 AM   #5
murray83
sega collector
 
Join Date: Mar 2017
Location: Daventry, UK
Posts: 436
Thanks: 102
Thanked 1 Time in 1 Post
murray83 is on a distinguished road
Re: help with selecting one number for multi

Quote:
Originally Posted by Gasman View Post
I'll put my hand up and own up. I have no clue as to what you are asking.?

Possibly why all those views and no response?

You have 3 records for that PO number and each has it's own SMS number.

So where does 4 sheets (I presume pages) come from.?

Just what are you trying to achieve.?

Also it would help if you would tell people how to get to what you are showing rather than having them dig around trying to work out the logic/process.?

If you want people to help you, you have to help them.

I thought i had put down the detail's, apologies

OK so when you click on print daily sms and input the intake date, which in my example data is 11/09/19 it produces the sms sheet which lists the skus and details

what is happening though the sms number which is a system generated number is, as it should making more then one as its auto number, but the issue i have is

each sheet/paper/page has an sms number, assigned also is po and sku(s) but when i have a po which has 3 skus on and then it genereates 3 sheets that is wrong

should make 1 sheet for that po, so my problem is how do i

1. only select one sheet if when this happens

or

2. the better option how do i fix it so that the autonumber looks at the po and if the one above matches assigns same number and then just prints the one sheet with the 2 skus on

hope this helps
murray83 is offline   Reply With Quote
Old 09-23-2019, 11:26 AM   #6
Pat Hartman
Super Moderator
 
Join Date: Feb 2002
Location: Stratford,Ct USA
Posts: 28,165
Thanks: 15
Thanked 1,577 Times in 1,499 Posts
Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all
Re: help with selecting one number for multi

Please reread #4 and post your query and some sample data that produces the "duplicates".
__________________
Bridge Players Still Know All the Tricks
Pat Hartman is online now   Reply With Quote
Old 09-23-2019, 12:22 PM   #7
Gasman
Enthusiastic Amateur
 
Join Date: Sep 2011
Location: Swansea, South Wales,UK
Posts: 4,114
Thanks: 422
Thanked 753 Times in 731 Posts
Gasman has a spectacular aura about Gasman has a spectacular aura about Gasman has a spectacular aura about
Re: help with selecting one number for multi

Pat,

There is no join, the report is based on a table siimilar to a spreadsheet format.
The sub report is based on the same table linked by a field from the table.

So a PO number exists 3 times each with a different SMS number.

__________________
Access novice. Sometimes trying to give something back.
Access 2007

Please, please use code tag # when posting code snippets

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Gasman is offline   Reply With Quote
Old 09-24-2019, 08:24 AM   #8
Pat Hartman
Super Moderator
 
Join Date: Feb 2002
Location: Stratford,Ct USA
Posts: 28,165
Thanks: 15
Thanked 1,577 Times in 1,499 Posts
Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all Pat Hartman is a name known to all
Re: help with selecting one number for multi

I guess I don't understand the problem. If there are three values for the field, what would you do with 2 and 3? It looks like the sms should be on the subreport to the right rather than on the main report.

I also don't see the reason for the delete and append queries. The report should be based on a query that takes the date argument. Once you break that apart, if you agree that moving the SMS to the subreport makes sense. Use a group by query for the main report that does NOT select anything except the first 5 fields. The last 4 fields go on the subreport.

Personally, I hate the popup form because the report opens behind it and I can't see the report. In order to not have the report prompt multiple times for the parameter, add a field to the form and instead of having a prompt in the query, either open the report using a where argument or change the report's Recordsource query to reference the form to get the date.

__________________
Bridge Players Still Know All the Tricks
Pat Hartman is online now   Reply With Quote
Reply

Tags
numbers , select

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Populate ComboBox after selecting or typing a number in another CB locorecto Forms 0 08-16-2010 10:02 AM
Selecting specified number of records trebor3900 Queries 1 05-19-2005 10:40 AM
Selecting a given 'number' of columns... pdbowling Modules & VBA 2 04-04-2003 01:33 AM
Selecting a number of records only Moira Triance Queries 2 09-27-2001 10:37 AM
[SOLVED] Multi Selecting Options from Check boxes thombas Forms 3 07-24-2001 05:45 AM




All times are GMT -8. The time now is 10:50 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World