Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
stevecoombs
Starting Member
1 Post |
Posted - 2005-01-05 : 21:11:33
|
Hello.I am designing a rota system for work, it is always done weekly and done by week commencing.I want to:Enter in a Field the Year, Enter in another field the month (drop Down), in the 3rd box I want a drop down list to appear of all the weeks commencing in that month, e.g:3 Jan 0510 Jan 0517 Jan 05.Thats problem one. It would be great if someone could make a mock table and form with it working so I can cut and paste it.This is how I have or am hoping to lay out my rota Form:Bar Name: Cocktail Bar ¦ -----------------------¦------------¦ ¦ ¦NAME¦ ¦Shift (Morning) ¦ ¦Shift¦ ¦ ¦ ¦--------------------------------------------------- ¦ ¦Name¦ ¦ ¦Name¦ ¦Shift (Evening) ¦ ¦Shift¦ ¦ ¦Shift¦ ¦-----------------------¦------------¦-------------¦This is a small version, on a busy night I have upto 40 staff, Say I put Sally in on the morning Shift, Then again for Evening, how can I make Access do a check to see if she has already worked that day.Look forward to your responds, have heard highly of this Forum.Thanks.Steve Coombs<edit> Moved to Access forum </edit> |
|
Stoad
Freaky Yak Linguist
1983 Posts |
Posted - 2005-01-06 : 06:24:33
|
Suppose,three combos on the form: cmbYear, cmbMonth, cmbMondaysof RowSourceType = "List of Values": 2005;2006;2007; & Jan;Feb;Mar;...;Dec;and empty list for the 3rd combo; it will be populated on the fly, by this VB code:Private Sub cmbMonth_AfterUpdate()On Error GoTo 1Dim i, r, ss = ""For i = 1 To 31r = cmbMonth & " " & i & " " & cmbYearIf DatePart("w", CDate(r)) = vbMonday Thens = s & r & ";"End IfNext i1Me.cmbMondays.RowSource = sEnd Suband the same code for Private Sub cmbYear_AfterUpdate() |
 |
|
|
|
|
|
|