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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|