Prev: How to use txtboxes and Combo boxes in a form
Next: Retrieve all record if check box = 0 (Not checked)
From: PleaseHelpMe on 27 May 2010 16:05 There are no recorsd being returned when i run my parameter query. SELECT TrackingID, DocumentNumber,DocumentType, RequestDate,DueDate, ProgramID, AssignedTo, Author, StatusDate,Subject,Notes FROM tblDocTracking WHERE (((tblDocTracking.ProgramID)=[forms]![frmProgramSelect]![ProgramID])); I have frmProgramSelect open. I am not sure what i am doing wrong. Can you help?
From: vanderghast on 27 May 2010 16:39 Be sure the control ProgramID is out of focus, to be sure that the value you keyed in has been "updated". If the control is not updated (committed), its last committed value, probably a null, will be used by the query. Vanderghast, Access MVP "PleaseHelpMe" <PleaseHelpMe(a)discussions.microsoft.com> wrote in message news:8CE604CD-3C0F-4DA4-B341-05246BC8CA75(a)microsoft.com... > There are no recorsd being returned when i run my parameter query. > > SELECT TrackingID, DocumentNumber,DocumentType, RequestDate,DueDate, > ProgramID, AssignedTo, Author, StatusDate,Subject,Notes > FROM tblDocTracking > WHERE > (((tblDocTracking.ProgramID)=[forms]![frmProgramSelect]![ProgramID])); > > I have frmProgramSelect open. > > I am not sure what i am doing wrong. Can you help?
From: Jeff Boyce on 27 May 2010 16:44 Any chance that the ?combobox field in your expression ([ProgramID] doesn't actually hold the ProgramID field? Regards Jeff Boyce Microsoft Access MVP -- Disclaimer: This author may have received products and services mentioned in this post. Mention and/or description of a product or service herein does not constitute endorsement thereof. Any code or pseudocode included in this post is offered "as is", with no guarantee as to suitability. You can thank the FTC of the USA for making this disclaimer possible/necessary. "PleaseHelpMe" <PleaseHelpMe(a)discussions.microsoft.com> wrote in message news:8CE604CD-3C0F-4DA4-B341-05246BC8CA75(a)microsoft.com... > There are no recorsd being returned when i run my parameter query. > > SELECT TrackingID, DocumentNumber,DocumentType, RequestDate,DueDate, > ProgramID, AssignedTo, Author, StatusDate,Subject,Notes > FROM tblDocTracking > WHERE > (((tblDocTracking.ProgramID)=[forms]![frmProgramSelect]![ProgramID])); > > I have frmProgramSelect open. > > I am not sure what i am doing wrong. Can you help?
From: KARL DEWEY on 27 May 2010 18:35 Did you make a selection in the Combo before running the query? If you want all records whereby you do not make a selection try using this -- SELECT TrackingID, DocumentNumber,DocumentType, RequestDate,DueDate, ProgramID, AssignedTo, Author, StatusDate,Subject,Notes FROM tblDocTracking WHERE tblDocTracking.ProgramID Like IIF([forms]![frmProgramSelect]![ProgramID] Is Null, "*", [forms]![frmProgramSelect]![ProgramID]); -- Build a little, test a little. "PleaseHelpMe" wrote: > There are no recorsd being returned when i run my parameter query. > > SELECT TrackingID, DocumentNumber,DocumentType, RequestDate,DueDate, > ProgramID, AssignedTo, Author, StatusDate,Subject,Notes > FROM tblDocTracking > WHERE (((tblDocTracking.ProgramID)=[forms]![frmProgramSelect]![ProgramID])); > > I have frmProgramSelect open. > > I am not sure what i am doing wrong. Can you help?
From: KARL DEWEY on 27 May 2010 18:50 Another way (copied from John Spencer post) -- SELECT TrackingID, DocumentNumber,DocumentType, RequestDate,DueDate, ProgramID, AssignedTo, Author, StatusDate,Subject,Notes FROM tblDocTracking WHERE tblDocTracking.ProgramID Like Nz([forms]![frmProgramSelect]![ProgramID], "*"); -- Build a little, test a little. "PleaseHelpMe" wrote: > There are no recorsd being returned when i run my parameter query. > > SELECT TrackingID, DocumentNumber,DocumentType, RequestDate,DueDate, > ProgramID, AssignedTo, Author, StatusDate,Subject,Notes > FROM tblDocTracking > WHERE (((tblDocTracking.ProgramID)=[forms]![frmProgramSelect]![ProgramID])); > > I have frmProgramSelect open. > > I am not sure what i am doing wrong. Can you help?
|
Next
|
Last
Pages: 1 2 Prev: How to use txtboxes and Combo boxes in a form Next: Retrieve all record if check box = 0 (Not checked) |