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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

List source from parameterized procedure

Status
Not open for further replies.

vmon

IS-IT--Management
Feb 14, 2002
74
0
0
US
I am trying to load a list box using a parameterized stored procedure with no luck at all. The procedure runs fine but rows are not loaded into list box. My statement looks like this.

Forms!frmEmailMaint!lstReports.RowSource = "EXEC procEmailMaintReportListBox '" & (Me.ID_Group) & "'"

Any ideas?,
vmon
 
Try loading the list box with SQL

For example if you have a list box "lstbox" and a table with the list's contents, let say "table1"
make rowsource =

SELECT field1,field2 FROM table1;

you can also limit it's content by adding a where clause

SELECT field1, field2 FROM table1 WHERE field1=5;

Hope this helps

 
Bullsandbears123,

I tried using SQL. Same resutl. I am not sure if this matters but the parameter is a uniqueidentifier dattype in SQL Server, aka GUID in Access. I think this might be part of my problem. Any other suggestions.

vmon
 
I have the stored procedure working. Problem now is the list box is not refreshing. I base the listbox content on an OnCurrent event of a subform. If I set row source to "" and recalc I going into endless loop. How do I get around that?

thanks,
vmon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top