First query should read
Code:
SELECT [DATE] Ad fldDate,
[VISIT FORM NO],
[OUTLET NO],
[NAME2],
[RATE],
[REMARKS],
[CUSTOMER TYPE],
ConcatRelated([RS NUMBER],
[waybill list query],
[OUTLET NO] & [VISIT FORM NO]= "'" &
[OUTLET NO] & [VISIT FORM NO] & "'")
AS [RS NUMBER]
FROM dbo_MAIN
GROUP BY [DATE],
[VISIT FORM NO],
[OUTLET NO],
[NAME2],
[RATE],
[REMARKS]
[CUSTOMER TYPE]
WHERE [DATE] Between # & [FORMS]![RSWAYBILL]![BEGINDATE] & #
And # & [FORMS]![RSWAYBILL]![ENDDATE] # & ";"
For a start do not use date as a field name this is a reserved word in Access. Secondly I do not know what you are trying to do when you say concatenate, which fields are you trying to concat?
Also you needed #'s around your date type filter expressions.
The error message you are getting usually means that the name of two fields in your sql statement cannot be found in the actual table/query.