My Assistant
|
|
Feb 23 2012, 10:54 AM
Post
#1
|
|
|
UtterAccess Veteran Posts: 342 |
Hi. I'm using the dynamic query code from MS query samples and am getting a "type mismatch" error. Here's the part of the code that I think is causing the problem -
CODE where = Null where = where & " AND [Q1_2011]= " + Me![Frame0] where = where & " AND [Q2_2011]= " + Me![Frame21] where = where & " AND [Q3_2011]= " + Me![Frame42] where = where & " AND [Q4_2011]= " + Me![Frame63] Q1, Q2, Q3, Q4 are long integers and the Frames are option groups with checkbox values 1, 2, 3 . . . Leaving all checkboxes blank returns all records as expected, but an error is generated if any box is checked. What am I missing? Thanks. |
|
|
|
Peter46 To sort isues out of this type you should add a de... Feb 23 2012, 11:40 AM
MtnGoat Thank you Peter46. I've done that once before... Feb 23 2012, 12:08 PM
John Vinson How are you Dim'ing the variable Where? If it... Feb 23 2012, 03:01 PM
MtnGoat Hi John. Yeah, "where" is dim'd as ... Feb 24 2012, 02:28 PM
John Vinson Just click the mouse in the grey bar to the left o... Feb 24 2012, 03:18 PM
MtnGoat Hi John.
I've done as you indicated and if I ... Feb 27 2012, 08:22 AM
Peter46 Add a temporary last line which is :
Debug.print m... Feb 27 2012, 09:45 AM
MtnGoat Hi Peter46.
I've added the code you suggested... Feb 27 2012, 11:32 AM
Peter46 Don't understand that.
Try..
Debug.print ... Feb 27 2012, 11:44 AM
MtnGoat Now I'm getting:
CODESELECT *
FROM tblSurveyR... Feb 27 2012, 11:48 AM
MtnGoat Not sure what happened here. I'm seeing you a... Feb 27 2012, 12:01 PM
Peter46 Well that implies that your Where clause is not be... Feb 27 2012, 12:09 PM
MtnGoat CODEPrivate Sub Command93_Click()
On Error... Feb 27 2012, 12:19 PM
MtnGoat Clarification on post #11:
I get the same results... Feb 27 2012, 12:35 PM![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 23rd May 2013 - 04:10 AM |