Interesting. Frank talked a lot about using it for the BE, but perhaps he was looking to implement it.
Shame UA is no more, he asked a lot of questions about it there.
As per pbaldy, if LDOW is really a datetime datatype, then try:
Set rs = CurrentDb.OpenRecordset("SELECT TOP 1 LDOW FROM qryWeeklyForecast WHERE LDOW=" & Format(Me.LDOW, "\#yyyy\-mm\-dd\#"), dbOpenSnapshot)
Try again, with the following adjustment:
' ...
strStep = "2. Set Target Database"
strNewConnectString = "ODBC;Provider=MSDASQL;Driver={SQL Server};Server=IPAddress;DATABASE=dBName;UID=dBSa;PWD=dBPassword;APP=Microsoft Office;" ' Example for Access database"
'...
When you query the connection string (eg Debug.Print tdf.Connect) VBA will not reveal the user and password to you, but it will have cached the values and apply them when you use the connection. This is for security, so it is more difficult for users to discover the connection credentials...
@xavier.batlle 's suggestion in Post #3 will not work either (both "#1" and "#2" will be returned since they satisfy the other half of the expression)- @XPS35 has the solution in Post #6.
@DHookom provides the cleanest solution in Post #4
Your options are:
([NewLineDesc] = "#1" Or...