Open Form with stLinkCriteria = "(Format([TimeGone],'dd/mm/yy')=" & Me!DateX
Is there a way to open a form and manipulate the Table side date
Basically I have a form & source table has the full date & time field
Invoices TimeGone = DateX 26-07-2018 13:01:47
Invoices1 DateX = 26-07-2018
I was to open the form using just the day part
I can filter with a query but just prefer to open in a few cases with simple openform command
stLinkCriteria = "(Format([TimeGone],'dd/mm/yy')=" & Me!DateX
DoCmd.OpenForm stDocname, , , stLinkCriteria
Missing "],)...." error
Just using [TimeGone] does not error but of course does not find anything.
I have tried dozens of different combinations of " ' brackets etc etc so above might be obviously poor but I am simply guess this is not possible on the table side.
The query is as below. This has the extra field of RegID but for testing I have ignored above.
SELECT Invoices.Key, Invoices.RegID, Format([TimeGone],"dd/mm/yy") AS TG
FROM Invoices
WHERE (((Invoices.RegID)=[Forms]![Invoices1]![RegID]) AND ((Format([TimeGone],"dd/mm/yy"))=Format([Forms]![Invoices1]![DateX],"dd/mm/yy")));
The two tables are Invoices & Invoices1, Invoices1 just had a date but I have formatted just to make sure correct way round for moment.
Is there a way to open a form and manipulate the Table side date
Basically I have a form & source table has the full date & time field
Invoices TimeGone = DateX 26-07-2018 13:01:47
Invoices1 DateX = 26-07-2018
I was to open the form using just the day part
I can filter with a query but just prefer to open in a few cases with simple openform command
stLinkCriteria = "(Format([TimeGone],'dd/mm/yy')=" & Me!DateX
DoCmd.OpenForm stDocname, , , stLinkCriteria
Missing "],)...." error
Just using [TimeGone] does not error but of course does not find anything.
I have tried dozens of different combinations of " ' brackets etc etc so above might be obviously poor but I am simply guess this is not possible on the table side.
The query is as below. This has the extra field of RegID but for testing I have ignored above.
SELECT Invoices.Key, Invoices.RegID, Format([TimeGone],"dd/mm/yy") AS TG
FROM Invoices
WHERE (((Invoices.RegID)=[Forms]![Invoices1]![RegID]) AND ((Format([TimeGone],"dd/mm/yy"))=Format([Forms]![Invoices1]![DateX],"dd/mm/yy")));
The two tables are Invoices & Invoices1, Invoices1 just had a date but I have formatted just to make sure correct way round for moment.