473,320 Members | 1,691 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,320 software developers and data experts.

Multiple Queries

4
Hi

Completly New to Access.
Is it possible to create 300 0r 400 seperate Queries from the design view.

The Data Base is ready the fields are there and I can create ONE query at a time.

Can I create them all at the one time using Critera and if so how!!

The fields require for each query are the same (with one exception each time)
SF001 or SF002 or SF003 etc.

A seperate query for each SF

Queries needed from SF001 to SF498

Regards
Nov 9 '06 #1
7 1910
NeoPa
32,556 Expert Mod 16PB
There are ways of doing what you want, but I suspect that if you post what you're actually trying to do, that there are better concepts that will enable you to avoid having so many.
Just doctoring the one on the fly is what springs to mind.
It would depend on how you intend to use it though.
Let us know.
Nov 9 '06 #2
bluish
4
Hi

Currently I have about 15 thousand divx files on the computer.

I have a batabase that lists All of these files.
Disc No / Track No / Artist / Song / Male / Female /Etc.
To be sure that the database records are exactly the as the Divx files, I need to
check them individually (or in disc order) the discs hold from 10 to 30 tracks.
SF001 has 23 tracks.

I'v been creating the queries for each SF (PHEW) Fingers Wasted.

The datebase will be printed.

My intention is that I can see at a glance SF (whatever) and sellect that number
in from the hard disc (Knowing the it will play the correct disc)

Many Thanks
Nov 9 '06 #3
NeoPa
32,556 Expert Mod 16PB
OK, I guess you've got at least one query set up for SF001.
Could you post the SQL of that query and we can look at some VBA code to doctor it for more flexibility.
Nov 10 '06 #4
bluish
4
OK, I guess you've got at least one query set up for SF001.
Could you post the SQL of that query and we can look at some VBA code to doctor it for more flexibility.
It would be great if I knew how to send that SQL to you (Simply dont know how)

Here is the layout that I have:

Fields: / Disc Name / Track / Song / Artist /
Table: / Karaoke / Karaoke / Karaoke / Karaoke /
Sort: / / ascending / / /
Show (All Ticked)
Critera / "SF001" / / / /

Have I given enough info !!

Many Thanks
Nov 10 '06 #5
NeoPa
32,556 Expert Mod 16PB
To get the SQL from a query :-
Open the query in design mode.
From the View menu select SQL view.
Copy and Paste the contents of the window into a post here.
Don't forget to surround the SQL with Code & /Code tags.
Nov 10 '06 #6
bluish
4
[quote=NeoPa]To get the SQL from a query :-

SELECT [Karaoke Por].[Disc Name], [Karaoke Por].Track, [Karaoke Por].Song, [Karaoke Por].Artist
FROM [Karaoke Por]
WHERE ((([Karaoke Por].[Disc Name])="SF001"))
ORDER BY [Karaoke Por].Track;

Thank You
Nov 10 '06 #7
NeoPa
32,556 Expert Mod 16PB
It depends on what you're wanting to do with the queries once you have them.
If you're doing it in code then you can extract the SQL from your first query and modify the SQL string, changing SF001 to SF??? depending on what's required.
You get the SQL from your main query using :
Expand|Select|Wrap|Line Numbers
  1. strSQL = CurrentDb.QueryDefs("YourQuery").SQL
If you want to use SF241 then your code to modify the SQL would be :
Expand|Select|Wrap|Line Numbers
  1. strSQL = Replace(strSQL, "SF001", "SF241")
Replace Function

Description

Returns a string in which a specified substring has been replaced with another substring a specified number of times.

Syntax

Replace(expression, find, replace[, start[, count[, compare]]])

The Replace function syntax has these named arguments:

Part Description
expression Required. String expression containing substring to replace.
find Required. Substring being searched for.
replace Required. Replacement substring.
start Optional. Position within expression where substring search is to begin. If omitted, 1 is assumed.
count Optional. Number of substring substitutions to perform. If omitted, the default value is –1, which means make all possible substitutions.
compare Optional. Numeric value indicating the kind of comparison to use when evaluating substrings. See Settings section for values.
PS. With a clearer understanding of how you intend to use the queries we could perhaps be of more assistance. Queries are used in all sorts of ways and some things are appropriate when building a recordsource for a form which wouldn't be for just showing the data in a table view.
Nov 11 '06 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: DG | last post by:
Hi, Can anyone advise how to execute multiple statements in a single query batch. For example- update customers set customer_name = 'Smith' where customer_name = 'Smyth'; select * from...
1
by: Jeremy | last post by:
I have built a form that calls queries. I have the first 2 set up as select queries, and the third set up as a make table query. When multiple users are on this application at the same time, they...
0
by: MHenry | last post by:
Hi, I know virtually nothing about creating Macros in Access. I would appreciate some help in creating a Macro or Macros that automatically run(s) 14 Queries (three Make Table Queries, and 11...
11
by: dskillingstad | last post by:
I've been struggling with this problem for some time and have tried multiple solutions with no luck. Let me start with, I'm a novice at Access and I'm not looking for someones help to design my...
4
by: Dave Edwards | last post by:
I understand that I can fill a datagrid with multiple queries, but I cannot figure out how to fill a dataset with the same query but run against multiple SQL servers, the query , table structure...
1
by: mattcatmattcat | last post by:
I have a VB7 aspx file I am creating that requires multiple queries each dependant on the previous queries results. If I run these queries in foxpro, I just run a query then create a cursor with...
8
by: beretta819 | last post by:
Ok, so I apologize in advance for the wordiness of what follows... (I am not looking for someone to make this for me, but to point me in the right direction for the steps I need to take.) I was...
7
by: vaiism | last post by:
I am creating a report that outputs the contact information and details about a water treatment plant, and needs to include information about people who work there. If I tie all the information...
11
by: shriil | last post by:
Hi I have this database that calculates and stores the incentive amount earned by employees of a particular department. Each record is entered by entering the Date, Shift (morn, eve, or night)...
14
by: Supermansteel | last post by:
My team at work uses Cognos to run multiple queries to pull in data. Then they take that data and import into Access and then usually run an Append Query to run a RND function to pull out a few...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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...
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...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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: 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...

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.