If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#11
|
|||
|
|||
Back to the loop that doesn't loop
Your welcime!
-- Gina Whipp "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index_files/TipList.htm "TeeSee" wrote in message ... On Jan 28, 10:35 pm, "Gina Whipp" wrote: Oops, forgot... This might help in understanding the difference between a RecordsetClone and a Recordset: http://www.fmsinc.com/free/newtips/A...ccesstip26.asp -- Gina Whipp "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index.htm "TeeSee" wrote in message ... On Jan 28, 8:29 pm, "Gina Whipp" wrote: TeeSee, I'm not sure I understand what you are trying to do... If Check2 = False you want to change to True and visa versa? -- Gina Whipp "I feel I have been denied critical, need to know, information!" - Tremors II http://www.regina-whipp.com/index.htm "TeeSee" wrote in message ... On Jan 28, 8:04 pm, TeeSee wrote: A couple of weeks ago I posted a looping code that I couldn't get right and I was steered (thankfully) towards SQL which I have made great use of since, however I didn't actually learn what I was doing wrong with the loopy code. I have a similar problem again now and the problem specifically is ...... I can't get off the first record! The code compiles (honest). The recordset is what I expect. The recordcount is correct. As the code steps thru its cycle I can see in the Immediate window that the values are changing from -1 to 0 and then on the second cycle back from 0 to -1. My item code shows that both cycles are for record 1 Could someone please explain Sorry ...I forgot to add the code. Time for bed! Private Sub Command4_Click() Dim rs As DAO.Recordset Dim X As Integer Set rs = Me.RecordsetClone Debug.Print rs.RecordCount rs.MoveFirst For X = 1 To rs.RecordCount Debug.Print SISItemCode.Value If Me.Check2 = True Then Debug.Print Me!Check2.Value Me.Check2 = False Debug.Print Me!Check2.Value ElseIf Me.Check2 = False Then Debug.Print Me!Check2.Value Me.Check2 = True Debug.Print Me!Check2.Value End If rs.MoveNext Next X End Sub- Hide quoted text - - Show quoted text - That is correct! Don't take this next question the wrong way please. Regardless of what I'm trying to do all I would really like an answer to is why can't i get past the first record?? Thanks for responding.- Hide quoted text - - Show quoted text - Many thanks Gina. The loopy code now loops. Thanks also for the info re rs'clone |
|
Thread Tools | |
Display Modes | |
|
|