Microsoft Access Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft Access Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old August 26th, 2004, 10:33 AM
calebsg calebsg is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Location: Saskatchewan!
Posts: 1 calebsg User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question Bookmarking the current date - really stuck

I have a subform that I use for creating schedules. After choosing the employee on the main form, the subform lists dates and what the employee is scheduled for that day. The Sched column is created automatically and the Work Type column is where we adjust the schedule to accomodate holidays and sick leave.

Here is the form (the subform is in the center, called "Scheduled Days"):

URL

Since the schedule becomes very large, we wrote the following code to have the subform pull up the schedule at today's date. This is the code:

Code:
Private Sub Form_Current()
' changed by DENAs
Dim MyRec As DAO.Recordset
Dim strCriteria As String
On Error Resume Next
	Me.Parent!lstSchedules = Me.Schedule
			
' this code try to bookmark currnet date
	Set MyRec = Me.RecordsetClone
			
	strCriteria = "SchDate=#" & Month(Date) & "/" & Day(Date) & "/" & Year(Date) & "#"
	MyRec.FindFirst strCriteria
' of course if exists the current date into table
	If Not MyRec.NoMatch Then Me.Bookmark = MyRec.Bookmark
	Set MyRec = Nothing
			
End Sub


My problem is, since we have it pull up the sched for today's date, I can no longer adjust the Work Type for any date other than today. Is there a way to have it pull up the sched starting at today's date but then still be able to change the Work type for other days?

This code ([Event Procedure]) is in the On Current setting in the properties for the subform.

I am a vb noobie and the chief needs the schedule printed again tomorrow, so I sure appreciate help!!!

Thanks,
Caleb

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft Access Development > Bookmarking the current date - really stuck


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
Stay green...Green IT