If you read the DoCmd line as part command, part query parameter, it makes sense. In pseudo code the line says:
Open form frmUnderWriting, but limit the records to WHERE txtAccountNumber is equal to the txtAccountNumber currently displayed on this form.
Consider the underlying SQL statement to be:
SELECT *
FROM (the table you are basing frmUnderWrting on)
WHERE txtAccountNumber = Some Value from the first form
Let's say the txtAccountNumber (which is an Integer, by the way and should not be prefixed with "txt") is 8, and the table the frmUnderWriting is based on is called tblUnderWriting.
SELECT *
FROM tblUnderWriting
WHERE [txtAccountNumber] = 8
That is basically what is going on with the code.
mmcdonal
|