I asked a similar question earlier but i I made a mess of the code so can the moderators please delete it and use this on instead
I need to write an expression in the expression builder that finds a departure date between two given dates that is greater than a given time.
I have three controls on a form called Flights. The controls are named cboDeparture1, cboDeparture2 and cboGreaterThanTime. Both cbo.Departure controls are formatted as dd/mm/yyyy and the cbo.GreaterThanTime control is formatted as hh:nn
I have referenced these controls as criteria in the Departure field of the Query so that they will filter the Query based on whatever is entered into the controls.
I have tried this code but it doesnt work.
Can anyone help.
Thank you
I need to write an expression in the expression builder that finds a departure date between two given dates that is greater than a given time.
I have three controls on a form called Flights. The controls are named cboDeparture1, cboDeparture2 and cboGreaterThanTime. Both cbo.Departure controls are formatted as dd/mm/yyyy and the cbo.GreaterThanTime control is formatted as hh:nn
I have referenced these controls as criteria in the Departure field of the Query so that they will filter the Query based on whatever is entered into the controls.
I have tried this code but it doesnt work.
Code:
Between [Forms]![Flights]![cboDeparture1]
And
[Forms]![Flights]![cboDeparture2]
And
TimeValue([Forms]![Flights]![cboDeparture1])>[Forms]![Flights]![cboGreaterThanTime])
Thank you
Last edited: