By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,603 Members | 1,093 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,603 IT Pros & Developers. It's quick & easy.

Ordering dates in sub form

P: n/a
In a reservations app I have a sub form (in datasheet view) that displays dates
in desc order. As these dates are both in the past and present I would like
current dates to appear when the form opens. ie. scroll up for future and down
for past.

Slight problem is that today may not be in the list. (Could be closed every
Friday)

Any thoughts on how to deal with this ?
TIA
David B
Hexham UK

Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
DFS
David,

If you won't have today, you'll have to use the nearest date (past or
future). Figure that out, call it "NearestDate" and do something like this
on the Form Open event:

DoCmd.GoToControl "ControlName"
DoCmd.FindRecord NearestDate, acEntire, , acSearchAll, , acCurrent
DoCmd.RunCommand acCmdSelectRecord
"David B" <da***@marleycotenospam.fsnet.co.uk> wrote in message
news:bt**********@newsg1.svr.pol.co.uk...
In a reservations app I have a sub form (in datasheet view) that displays dates in desc order. As these dates are both in the past and present I would like current dates to appear when the form opens. ie. scroll up for future and down for past.

Slight problem is that today may not be in the list. (Could be closed every Friday)

Any thoughts on how to deal with this ?
TIA
David B
Hexham UK

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.