Combo Box

KabirPatel

Registered User.
Local time
Today, 20:36
Joined
Nov 16, 2006
Messages
38
I have a couple of combo boxes within the "Form Header" of a form in my .adp. Each of these combo boxes is populated from a SQL Server table using a stored procedure.

The values selected in the combo boxes define what records are returned in the "Detail" part of the form.

To implement this I added code to the "AfterUpdate" event of the 2 combo boxes as follows:
------------------------------
Dim strRecordSource As String
strRecordSource = "EXEC dbo.mystoredproc'" & cmb_1 & "', '" & cmb_2 & "'"

Me.RecordSource = strRecordSource
-----------------------------
This correctly returns the values for the detail section of my form. However, after selecting a different value in my combo box, the selected value goes blank.

Does anybody have an idea as to why this might be the case?

Thanks
Kabir
 

Users who are viewing this thread

Back
Top Bottom