View Single Post
Old 08-25-2019, 07:00 AM   #5
isladogs
Part time moderator
 
isladogs's Avatar
 
Join Date: Jan 2017
Location: Somerset, UK
Posts: 10,366
Thanks: 112
Thanked 2,845 Times in 2,593 Posts
isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold isladogs is a splendid one to behold
Re: open report with 2 conditions

OK. No type mismatch errors so NN is a number field and DatumTA is a date field.
Next thing to check are the control names on the form are definitely NN and cboDatumTA. If not either rename them or modify the code line.
Also check that the bound column of the combo is the DatumTA field.
If not, you do need to use .Column(0)

FWIW you forgot to rename your report without spaces.

EDIT If your default date format isn't mm/dd/yyyy then you need to format your sql string as arnelgp suggested

Code:
DoCmd.OpenReport "AlleDossiers", acViewPreview, , "NN =" & Me.TxtNN & " And DatumTA =#" & Format(Me.cboDatumTA,"mm/dd/yyyy") & "#"
__________________
If this answer has helped, please click the Thanks button and/or click the 'reputation scales' symbol on the left.

Website links:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Colin
Access 2010 32-bit, Access 2016 32-bit & 64-bit, SQL Server Express 2014, Windows 10,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
,
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Last edited by isladogs; 08-25-2019 at 07:14 AM.
isladogs is offline   Reply With Quote