Hi,
I have a code in which I want to set the rowsource properties accordingly.
str1 = "Select [Lib#], [CLName] from Library where [CLName]= '" & lstTResult.Column(Item) & "' "
Set Rec = CurrentDb.OpenRecordset(str1, dbOpenDynaset)
//here i want to set the rowsouce properties to query
If Rec.RecordCount <> 0 Then
Forms!TDocID!lstLib.RowSource = str1
End If
//Here i want to set the rowsource property to value..
If Rec.RecordCount = 0 Then
msg = "Enter New Library# for " & lstTResult.Column(Item)
instr1 = InputBox(msg)
Forms!TDocID!lstLib.RowSource = instr1
End If
Any help will be appreciated.
I have a code in which I want to set the rowsource properties accordingly.
str1 = "Select [Lib#], [CLName] from Library where [CLName]= '" & lstTResult.Column(Item) & "' "
Set Rec = CurrentDb.OpenRecordset(str1, dbOpenDynaset)
//here i want to set the rowsouce properties to query
If Rec.RecordCount <> 0 Then
Forms!TDocID!lstLib.RowSource = str1
End If
//Here i want to set the rowsource property to value..
If Rec.RecordCount = 0 Then
msg = "Enter New Library# for " & lstTResult.Column(Item)
instr1 = InputBox(msg)
Forms!TDocID!lstLib.RowSource = instr1
End If
Any help will be appreciated.