Hi all, any help welcome with this one.
I have some code that currently works with my MS Access D'base. The user highlights data within a list box and the cells above are populated with the users selection. Now I have moved the D'base to SQL and the code no longer works. I was wondering if any one else has some clever code that update cells when selecting from a list box. The code I used is as follows (ID is the fields with the unique identifier and lstRecords is the list box):
ynListSel = True
Dim rs As Object
With frm
Set rs = .Recordset.Clone
rs.FindFirst "ID = " & !lstRecords
.Bookmark = rs.Bookmark
!cmdNewRecord.Enabled = True
End With
Set frm = Forms!frmMain
varInvoiceRef = frm!lstRecords
I have some code that currently works with my MS Access D'base. The user highlights data within a list box and the cells above are populated with the users selection. Now I have moved the D'base to SQL and the code no longer works. I was wondering if any one else has some clever code that update cells when selecting from a list box. The code I used is as follows (ID is the fields with the unique identifier and lstRecords is the list box):
ynListSel = True
Dim rs As Object
With frm
Set rs = .Recordset.Clone
rs.FindFirst "ID = " & !lstRecords
.Bookmark = rs.Bookmark
!cmdNewRecord.Enabled = True
End With
Set frm = Forms!frmMain
varInvoiceRef = frm!lstRecords