A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Make Table query from a Linked Table



 
 
Thread Tools Display Modes
  #1  
Old February 19th, 2007, 07:26 PM posted to microsoft.public.access.queries
conrad
external usenet poster
 
Posts: 16
Default Make Table query from a Linked Table

Hello all,
I am trying to create a Form with a command button that executes a "Make
table" query with "date" criteria "Between [Forms]![Sales DB Creation]![Month
Start Date] And [Forms]![Sales DB Creation]![Month End Date]" that references
my date criteria off of a form.

The query has the date range I need, but when I execute the query I recieve
an error message with no detail what-so-ever, the error message is "Reserved
Error - (-7713); there is no message for this error". If I change the date
criteria to " Between 1/1/2007 and 1/31/2007" the query will run and create
my "New Table" based up my date fields.


Let me know some suggestions

  #2  
Old February 19th, 2007, 08:38 PM posted to microsoft.public.access.queries
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Make Table query from a Linked Table

On Mon, 19 Feb 2007 11:26:16 -0800, Conrad
wrote:

Hello all,
I am trying to create a Form with a command button that executes a "Make
table" query with "date" criteria "Between [Forms]![Sales DB Creation]![Month
Start Date] And [Forms]![Sales DB Creation]![Month End Date]" that references
my date criteria off of a form.

The query has the date range I need, but when I execute the query I recieve
an error message with no detail what-so-ever, the error message is "Reserved
Error - (-7713); there is no message for this error". If I change the date
criteria to " Between 1/1/2007 and 1/31/2007" the query will run and create
my "New Table" based up my date fields.


Let me know some suggestions


First off... WHY do you want a MakeTable query? They are very rarely
necessary. If you need to generate a Report, export data, create
another query... you can do so from a Select Query; making it into a
MakeTable just adds (substantial) overhead and bloat in your database,
and leaves you with the dilemma of handling multiple identical tables
that just have different date ranges.

That said... try right clicking the table background and select
Parameters. Add the two forms reference parameters (copy and paste
them, they must be absolutely identical) into the left column of the
parameters grid, and select date/time as the datatype in the second
column.

Note that you can also save the user from having to remember the
number of days in the month ("Thirty days hath September, April June
and November..."): a criterion

= DateSerial([Enter year:], [Enter month number:], 1) AND DateSerial([Enter year:], [Enter month number:] + 1, 1)


will let you select any desired month.

John W. Vinson [MVP]
  #3  
Old February 19th, 2007, 08:45 PM posted to microsoft.public.access.queries
Marshall Barton
external usenet poster
 
Posts: 5,361
Default Make Table query from a Linked Table

Conrad wrote:
I am trying to create a Form with a command button that executes a "Make
table" query with "date" criteria "Between [Forms]![Sales DB Creation]![Month
Start Date] And [Forms]![Sales DB Creation]![Month End Date]" that references
my date criteria off of a form.

The query has the date range I need, but when I execute the query I recieve
an error message with no detail what-so-ever, the error message is "Reserved
Error - (-7713); there is no message for this error". If I change the date
criteria to " Between 1/1/2007 and 1/31/2007" the query will run and create
my "New Table" based up my date fields.



As long as the text boxes on the form have Date/Time values,
your original criteria should work. Are you sure that you
are entering full dates in the text boxes? Are the text
box's Format property set to a date type format?

There will be an type mismatch issue if the field with that
criteria is not a Date/Time field.

Your second try will not do what you want. Literal dates
need to be enclosed in the # date delimiter:
Between #1/1/2007# And #1/31/2007#
and the dates must be in USA style (mm/dd/yyyy) or an
unambiguous style (e.g. yyyy-mm-dd)

--
Marsh
MVP [MS Access]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:39 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.