Any help on this would be hugely appreciated. I'm trying to convert an Old Access Database over to VB.NET and it's been a while since using VB.NET The backend is a .MDB (for now).
I have the following code I wish to convert.. All the form items are the same - names etc... I do have an option group on both forms which I would like to still pull the case from - I'm pretty sure this is possible in .NET?
The trickier part as I'm aware of will be when the user clicks the item that populates in the listbox, how to load the form as unlike access, the textboxes do not have control sources.
Thanks so much!!!
***Code to Populate List Box On Search Form***
Dim dB As DAO.Database
Dim rS As DAO.Recordset
Dim sSQL As String
Set dB = CurrentDb
sSQL = ""
sSQL = sSQL & "SELECT [PendingClaimNum], Last, First, DatePending, Custodian, PendingID "
sSQL = sSQL & "FROM [Pending] "
Select Case Me.fraCriteriaType.Value
sSQL = sSQL & "WHERE [PendingClaimNum] = '" & Me.txtClmNo & "'"
If IsNull(Me.txtFirstName) Then
sSQL = sSQL & "WHERE Last LIKE '" & Me.txtLastName & "'"
sSQL = sSQL & "WHERE Last LIKE'" & Me.txtLastName & "' AND First LIKE '" & Me.txtFirstName & "'"
sSQL = sSQL & "WHERE DatePending = '" & Me.txtDate & "'"
sSQL = sSQL & "WHERE Custodian = '" & Me.cboSpecialist.Value & "' " & "And IsNull(DateClosed) " & " And PendingStatus = 'Pending' "
'sSQL = sSQL & "WHERE ProvName LIKE '" & Me.txtProvider & "'"
'sSQL = sSQL & "WHERE ProvNum LIKE '" & Me.providernum & "'"
sSQL = sSQL & " ORDER BY [DatePending] ASC"
Me.lstResults.RowSource = sSQL
If Me.lstResults.ListCount = 0 Then
MsgBox "Your search did not find a match"
***Code To Open Result***
Dim stDocName As String
Dim stLinkCriteria As String
On Error GoTo Err_Open_Click
stDocName = "Pending"
stLinkCriteria = "[PendingID]=" & Me.lstResults.Column(5)
DoCmd.OpenForm stDocName, , , stLinkCriteria