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

Week form

P: n/a
Kd
I have a table with 5 days and weekno on it
it supplys 10 years woth of dates for sub forms for schedule
iam looking for advice on best approach to open form frmSchedule to
current date

tblWeek
fields
Day1-----------Mon
Day2---Tues
Day3--Wed
Day4--Thurs
Day5---Fri
WeekNo--yyyy--ww
Thanks for any and all input

Jan 6 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Presumably you want all dates to be available, but for the form to
automatically open to today's date. Use the Load event of the form to find
today's record.

This kind of thing:

Private Sub Form_Load()
Dim strWhere As String
If Not Me.NewRecord Then
strWhere = "[ScheduleDate] = " & Format(Date, "\#mm\/dd\/yyyy\#")
With Me.RecordsetClone
.FindFirst strWhere
If .NoMatch Then
RunCommand acCmdRecordsGotoNew
Else
Me.Bookmark = .Bookmark
End If
End With
End If
End Sub

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Kd" <ke******@yahoo.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
I have a table with 5 days and weekno on it
it supplys 10 years woth of dates for sub forms for schedule
iam looking for advice on best approach to open form frmSchedule to
current date

tblWeek
fields
Day1-----------Mon
Day2---Tues
Day3--Wed
Day4--Thurs
Day5---Fri
WeekNo--yyyy--ww
Thanks for any and all input

Jan 6 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.