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 |
#1
|
|||
|
|||
Command Button in Subform Header desgined to loop through records
I've been stumped for a many hours trying to get this to work.
I have a form(Locations) with multiple tabs. Each tab has a continuous subform(Equipment) I have a command button in the subform's header with the following code. I removed all other code inside the loop. When I click this button, for some reason only the first record in the subform gets updated. Any help would be appreciated. Private Sub cmdCheckConnection_Click() Dim sRemoteMacAddress As String Dim rst As DAO.Recordset Set rst = Me.RecordsetClone With Me.Form.RecordsetClone If .RecordCount 0 Then .MoveFirst Do Until .EOF 'My code that changes the MAC Address field in the record 'if it can connect to the workstation. Otherwise updates that field 'to display 'Not Connected' .MoveNext Loop End If End With End Sub |
#2
|
|||
|
|||
Command Button in Subform Header desgined to loop through records
hi Steve,
Steve wrote: Private Sub cmdCheckConnection_Click() Dim sRemoteMacAddress As String Dim rst As DAO.Recordset Set rst = Me.RecordsetClone With Me.Form.RecordsetClone Why do you not use your recordset clone in rst? mfG -- stefan -- |
#3
|
|||
|
|||
Command Button in Subform Header desgined to loop through reco
that was anothr bit of code I was trying to work with. The latest try was
without these 2 lines. Dim rst As DAO.recordset Set rst = Me.RecordsetClone "Stefan Hoffmann" wrote: hi Steve, Steve wrote: Private Sub cmdCheckConnection_Click() Dim sRemoteMacAddress As String Dim rst As DAO.Recordset Set rst = Me.RecordsetClone With Me.Form.RecordsetClone Why do you not use your recordset clone in rst? mfG -- stefan -- |
Thread Tools | |
Display Modes | |
|
|