I tried your suggestion but still no luck.<br>
Maybe the entire line of code would help.<br>
Thanks again.<br>
<br>
<br>
<br>
Public Function RefreshSmartSearch()<br>
Dim CurDB As Database, GetData As Recordset, RestofArgs As String<br>
Set CurDB = CurrentDb()<br>
Me!OptionLabel1.Visible = False<br>
Me.Option1.Visible = False<br>
Me!OptionLabel2.Visible = False<br>
Me.Option2.Visible = False<br>
Me!OptionLabel3.Visible = False<br>
Me.Option3.Visible = False<br>
Me!OptionLabel4.Visible = False<br>
Me.Option4.Visible = False<br>
Me!OptionLabel5.Visible = False<br>
Me.Option5.Visible = False<br>
Me!OptionLabel6.Visible = False<br>
Me.Option6.Visible = False<br>
Me!OptionLabel7.Visible = False<br>
Me.Option7.Visible = False<br>
Me!OptionLabel8.Visible = False<br>
Me.Option8.Visible = False<br>
If Not IsNull(Me.OpenArgs) Then<br>
'This code parses the OpenArgs line stripping the Entry Name, Key Field Name, Key Field Type of Data, and Calling Form<br>
'Each variable is separated by commas. Using the Left and Mid functions it finds the commas and therefore the data<br>
'RestofArgs is a temporary variable used to store the Rest of the Argument String<br>
'DefEntry, KeyField, KeyDataType, and CallingForm are Declared in this form<br>
'They are used to return to the calling form<br>
Me!SmartSearchTabs.Pages![Define Search].Visible = False<br>
Me!SmartSearchTabs.Pages![Display All].Visible = False<br>
Me!SmartSearchTabs.Style = 2<br>
<br>
DefEntry = Left(Me.OpenArgs, InStr(1, Me.OpenArgs, ","

- 1)<br>
RestofArgs = Mid(Me.OpenArgs, InStr(1, Me.OpenArgs, ","

+ 1)<br>
KeyField = Left(RestofArgs, InStr(1, RestofArgs, ","

- 1)<br>
RestofArgs = Mid(RestofArgs, InStr(1, RestofArgs, ","

+ 1)<br>
KeyDataType = Left(RestofArgs, InStr(1, RestofArgs, ","

- 1)<br>
CallingForm = Mid(RestofArgs, InStr(1, RestofArgs, ","

+ 1)<br>
<br>
Set GetData = CurDB.OpenRecordset("SELECT * FROM ezs_SmartSearchDefinition WHERE SearchID = " & Chr(34) & DefEntry & Chr(34) & " ORDER BY Sequence", DB_OPEN_DYNASET)<br>
Num = 1<br>
Me.caption = "Smart Search-" & DefEntry<br>
If GetData.EOF Then<br>
DoCmd.Close 'No Records Found - Close the Form<br>
Exit Function<br>
End If<br>
<br>
Else 'Definition Mode - No Arguments Passed<br>
Me!SmartSearchTabs.Pages![Define Search].Visible = True<br>
Me!SmartSearchTabs.Pages![Display All].Visible = True<br>
Me!SmartSearchTabs.Style = 0<br>
Me.SmartSearchTabs.TabFixedHeight = 0<br>
If Not IsNull(Me![FindSearchID]) Then<br>
DefEntry = Me![FindSearchID]<br>
Else<br>
Set GetData = CurDB.OpenRecordset("SELECT * FROM ezs_SmartSearchDefinition", DB_OPEN_DYNASET)<br>
If Not GetData.EOF Then<br>
DefEntry = GetData!SearchID<br>
End If<br>
End If<br>
Set GetData = CurDB.OpenRecordset("SELECT * FROM ezs_SmartSearchDefinition WHERE SearchID = " & Chr(34) & DefEntry & Chr(34) & " ORDER BY Sequence", DB_OPEN_DYNASET)<br>
Num = 1<br>
Me.caption = "Smart Search Definition Mode-" & DefEntry<br>
End If<br>
<br>
If Not GetData.EOF Then<br>
GetData.MoveLast<br>
NumSearch = GetData.RecordCount<br>
GetData.MoveFirst<br>
Do While Not GetData.EOF<br>
Me!FindSearchID = GetData!SearchID<br>
Select Case Num<br>
Case 1<br>
Me!OptionLabel1 = GetData!OptionLabel<br>
Me!OptionLabel1.Visible = True<br>
Me.Option1.Visible = True<br>
If GetData!LastSelectedOption >= 1 And GetData!LastSelectedOption <= 8 Then<br>
Me![TypeofSearch] = GetData!LastSelectedOption<br>
Else<br>
Me![TypeofSearch] = 1<br>
End If<br>
Case 2<br>
Me!OptionLabel2 = GetData!OptionLabel<br>
Me!OptionLabel2.Visible = True<br>
Me.Option2.Visible = True<br>
Case 3<br>
Me!OptionLabel3 = GetData!OptionLabel<br>
Me!OptionLabel3.Visible = True<br>
Me.Option3.Visible = True<br>
Case 4<br>
Me!OptionLabel4 = GetData!OptionLabel<br>
Me!OptionLabel4.Visible = True<br>
Me.Option4.Visible = True<br>
Case 5<br>
Me!OptionLabel5 = GetData!OptionLabel<br>
Me!OptionLabel5.Visible = True<br>
Me.Option5.Visible = True<br>
Case 6<br>
Me!OptionLabel6 = GetData!OptionLabel<br>
Me!OptionLabel6.Visible = True<br>
Me.Option6.Visible = True<br>
Case 7<br>
Me!OptionLabel7 = GetData!OptionLabel<br>
Me!OptionLabel7.Visible = True<br>
Me.Option7.Visible = True<br>
Case 8<br>
Me!OptionLabel8 = GetData!OptionLabel<br>
Me!OptionLabel8.Visible = True<br>
Me.Option8.Visible = True<br>
End Select<br>
GetData.MoveNext<br>
Num = Num + 1<br>
Loop<br>
End If<br>
TypeofSearch_AfterUpdate<br>
End Function<br>
<br>
<br>
<br>