Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to set the Recordset properties through coding???

Status
Not open for further replies.

rbasram

Programmer
Sep 27, 2001
53
CA
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 = &quot;Enter New Library# for &quot; & lstTResult.Column(Item)
instr1 = InputBox(msg)
Forms!TDocID!lstLib.RowSource = instr1
End If


Any help will be appreciated.
 
Sorry rsoor I'm obviously missing something - but it seems to me that you've posted the solution - what is it that you're having problems with?


G LS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top