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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Storing values from form in query

Status
Not open for further replies.

RayProud

Programmer
Nov 10, 2004
18
0
0
GB
I have a problem with a query that works in Access 97 but doesn't with the same database converted to Access 2003 (SP1).

I display a form that requests two pieces of info from the user - a Start Sequence Number and End Sequence Number. These are entered into text boxes. The user presses the Print button and this should produce a report linked to a query that returns the records between the two numbers and includes the two sequence numbers supplied by the user. These are displayed at the top of the report showing the sequence numbers entered.

This works fine in Access 97 but I cannot get the two Sequence Number fields populated in the query. Blanks are shown instead. All other fields are displayed correctly.

Here is the code in SQL from the query. I've removed most of the selected fields for clarity.

SELECT SerialNo, Surname, Inits, SequenceNumber, [Forms]![frmAuditPrintSeqNo]![txtStartSeqNo] AS StartSeqNo, [Forms]![frmAuditPrintSeqNo]![txtEndSeqNo] AS EndSeqNo
FROM qryAuditPrintSeqNo
WHERE (((SequenceNumber) Between [Forms]![frmAuditPrintSeqNo]![txtStartSeqNo] And [Forms]![frmAuditPrintSeqNo]![txtEndSeqNo]))
ORDER BY SequenceNumber;

There appears to be a bug in Access 2003. Would installing SP2 resolve this?

Thanks for any help.
 
Just a follow-up to my earlier post. I've discovered the PC in question is running Microsoft Jet 3.6 and not 4.0 as Microsoft recommend. Could this be the problem and are there any other known issues with Jet 3.6 and Access 2003 I should be aware of?

I'm trying to get my IT support people to upgrade to Jet 4.0 but if I tell you that I work for a large government department it probably explains why it's not an easy thing to get implemented without at least 6 meetings!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top