From: John Quinn on 22 Apr 2010 17:43 Sorry Guys, I rarely use Sub-Routines. I want to continue where I left off. Do not know what is wrong with the code below. Private Sub WeekNo_GotFocus() Dim W As Byte W = 18 HoldWeek (W) Me!WeekNo = W End Sub Public Sub HoldWeek(W As Byte) ' Comes in Correctly Dim db As DAO.database Dim rst As DAO.Recordset Set db = CurrentDb Set rst = db.OpenRecordset("Select * From WeeklySchedule") rst.MoveLast W = rst!WeekNo ' This is the number 9 End Sub The correct Week # is 9 and it is stored correctly. When I return to the calling Sub-Routine it stay at 18. I cannot get it to go to 9. Is it because I am using Got Focus? Any Help Appreciated Thanks in Advance JQ
From: Mayayana on 22 Apr 2010 19:27 Whatever you're using, it's not VBScript. | Sorry Guys, I rarely use Sub-Routines. | | I want to continue where I left off. | | Do not know what is wrong with the code below. | | | | Private Sub WeekNo_GotFocus() | | Dim W As Byte | | W = 18 | HoldWeek (W) | Me!WeekNo = W | | End Sub | Public Sub HoldWeek(W As Byte) ' Comes in Correctly | | Dim db As DAO.database | Dim rst As DAO.Recordset | | Set db = CurrentDb | | Set rst = db.OpenRecordset("Select * From WeeklySchedule") | | rst.MoveLast | W = rst!WeekNo ' This is the number 9 | | End Sub | | The correct Week # is 9 and it is stored correctly. When I return to the | calling Sub-Routine it stay at 18. I cannot get it to go to 9. | | Is it because I am using Got Focus? | | Any Help Appreciated | | Thanks in Advance | | JQ
From: Bob Barrows on 23 Apr 2010 09:29 It appears you intended to post this to an Access VBA group since this certainly is not vbscript John Quinn wrote: > Sorry Guys, I rarely use Sub-Routines. > > I want to continue where I left off. > > Do not know what is wrong with the code below. > > > > Private Sub WeekNo_GotFocus() > -- HTH, Bob Barrows
|
Pages: 1 Prev: using VBscript in Custom actions during installation (MSI) Next: Printing a HTA page |