Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I'm totally blacked out

Status
Not open for further replies.

jurgen

Programmer
Feb 8, 2001
209
BE
Hi, I'm ... totally lost

I have a query dat is based on a table with a start and enddat in it. On my form I got 2 fields unbound to query the dat from / until. Now if I execute this query, the query returns a list of rows matching the fields.

The next thing I enter data of a document in unbound fields and all the records in the query must be filled (duplicated)in based on that document information.

Each record has 3 empty fields, and have to be replaced with the values on the document

Start End Nbr Date Inv Inv Inv Nbr
01/10/2001 - 31/10/2001 2523 05/11/2001 INV 1256828
01/10/2001 - 31/10/2001 2569 05/11/2001 INV 1256828
01/10/2001 - 31/10/2001 2625 05/11/2001 INV 1256828

Can someone help me ? to solve this problem, I tried to built a SELECT statement using
SELECT * FROM Tbl_Allocations WHERE PerStart >= " & me.dStartDate & " AND PerEnd >= " & me.dEndDate & ";"

But I always get an error on the enddate, I killed the field created it again, in table-query-form but nothing seems to help, if I ask on the form to display all records < then enddate, no problem for the Query, i was thinking write a select statement, but it doesn't display a single record !! And there are always records !! Help wanted

Thankx


JJ

 
Use # to delimit dates in Access queries.

SELECT * FROM Tbl_Allocations
WHERE PerStart >= #&quot; & Me.dStartDate & &quot;# AND PerEnd >= #&quot; & Me.dEndDate & &quot;#;&quot;

I recommend reading the article about &quot;International Dates in Access&quot; at the following link.

Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top