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

Create new table query prompts "Enter Parameter Value"

I'm trying to convert a query I made into a table. This query's name is "VendorOrd" and when I run it everything works fine. There are three fields: Vendor, VendorPriority and SKU.

When I run it, the table looks like this:
Expand|Select|Wrap|Line Numbers
  1. Vendor | VendorPriority | SKU | Date
  2. ASDF   | 1              | 123 | 140703
  3. ASDF   | 2              | 154 | 140703
  4. ASDF   | 1              | 541 | 140703
  5. FDSA   | 1              | 454 | 140703
  6. FDSA   | 1              | 210 | 140703
  7. ASDF   | 3              | 478 | 140703
  8. FDSA   | 2              | 142 | 140703
  9.  
And here's my SQL code for the output above:

Expand|Select|Wrap|Line Numbers
  1. SELECT t1.Vendor, t1.VendorPriority, t1.SKU, t1.Date
  2.  
  3. FROM tblVendorItems AS t1, (SELECT MIN(t.VendorPriority) AS priority, t.SKU FROM tblVendorItems AS t WHERE t.CanShipSameDay=True AND t.VendorPriority>0 GROUP BY t.SKU)  AS t2
  4.  
  5. WHERE (((t1.VendorPriority)=[t2].[priority]) AND ((t1.SKU)=[t2].[SKU]));
  6.  



Then when I try to convert it to a table I made a new query called "CreateTable" which creates a table called "VendorOrder"

The SQL for this query is:

Expand|Select|Wrap|Line Numbers
  1. SELECT Vendor, SKU, Date 
  2. INTO VendorOrder
  3. FROM VendorOrd
  4.  
However, when I try to run this, Access prompts me to "Enter the Parameter Values" for SKU and Date. When I just ignore those prompts and click "OK" the query creates the table "VendorOrder".

The Vendor field works fine, but the SKU and Date fields are blank.



Any idea on how to fix this?
Jul 3 '14 #1
3 1756
twinnyfo
3,653 Expert Mod 2GB
Because SKU and Date are numerical values in your query, Access doesn't know how to put them into the table (particularly the date).

I am searching for methods to add parameters to Make Table queries, but am short on time, myself....
Jul 3 '14 #2
It's alright twinnyfo I solved it. Thanks for help anyways. I'll post later explaining what I did, because I don't have a lot of time right now.

Thanks again
Jul 3 '14 #3
Rabbit
12,516 Expert Mod 8TB
Just a sidenote, you probably don't want to create a table from that query since the results of that query can change. You would have to constantly recreate that table. It's better to just use it as a query and run the query when needed for the results.
Jul 3 '14 #4

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

Similar topics

8
by: cainlevy | last post by:
I'm wondering if there's any way to speed up create table queries? Besides upgrading hardware, that is. The very simplest table creation query, "create table table1 ( field1 INT(10))" is taking...
6
by: Bruce | last post by:
I want to create a new table based on an existing table, but I don't want the tables to have any enforced relationship. Is this possible without having to do a CREATE TABLE and an INSERT? ...
0
by: TNO | last post by:
I have installed Office 97 Pro SR-2 (including Access 97) on Windows XP Pro. Access starts correctly but a have no possibility to create new table or query. Clicking on button or selecting...
1
by: JJ | last post by:
I have a Make Table query which uses a date parameter. Each time the user runs the query they will be prompted for a date. The table which is created should be named based on the date which they...
2
by: Alicia | last post by:
Does anyone know why I am getting a "Syntax error in Create Table statement". I am using Microsoft Access SQL View to enter it. Any other problems I may run into? CREATE TABLE weeks (...
6
by: sheree | last post by:
I would like to create a query where one of the columns of the queries comes from a combo list box on a form. For example, if my table has the following fields: id name interest1 interest2...
3
by: Galka | last post by:
Hello Why do you think a create table query doesn't create table from the following code? Set myQuery = myDB.QueryDefs("qryCON absent adults previous day log") myQuery.Execute If I execute...
1
by: Johnsi Rani | last post by:
I have already created the tables in access.I want to have the create table query for the existing tables. plz help me
24
by: Dan2kx | last post by:
Hello to all that read and thank you to all that post Background: I have been tasked to create a holiday database for the employees in my lab, (so expect many more posts) im stuck at the first...
1
by: Gina Louise | last post by:
My database is essentially a big diary for lots of trainers so we can plan future training dates and record past training. There are a variety of queries we need to run on this data, e.g. look up the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.