By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
462,297 Members | 700 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 462,297 IT Pros & Developers. It's quick & easy.

Search Form Appearence

P: 3
Hello to everybody. I have a Search Form with two options as criteria. "Days" and "Works" of each day . Days is a combo box with the days of the week. Data of combo box are records of the Days Table . Although the days of Criteria Section appear as words, the results appear by the DayID of the the Day Table. How can I make them appear as words? Forgive my mistakes in English (I 'm from Greece). Thank you all. here is the code:

Option Compare Database
Option Explicit

Private Sub cmdFilter_Click()

Dim strWhere As String
Dim lngLen As Long

If Not IsNull(Me.FilterDay) Then
strWhere = strWhere & "([DayID] = " & Me.FilterDay & ") AND "
End If

If Not IsNull(Me.FilterStreet) Then
strWhere = strWhere & "([Street] Like ""*" & Me.FilterStreet & "*"") AND "
End If

lngLen = Len(strWhere) - 5
If lngLen <= 0 Then
MsgBox "Insert kriteria", vbInformation, "Nothing to execute."
strWhere = Left$(strWhere, lngLen)

Me.Filter = strWhere
Me.FilterOn = True
End If
End Sub

Private Sub cmdReset_Click()

Dim ctl As Control

For Each ctl In Me.Section(acHeader).Controls
Select Case ctl.ControlType
Case acTextBox, acComboBox
ctl.Value = Null
Case acCheckBox
ctl.Value = False
End Select

Me.FilterOn = False
End Sub

Private Sub Exit_Click()

End Sub

Private Sub Form_BeforeInsert(Cancel As Integer)

Cancel = True
MsgBox "You can't add data.", vbInformation, "Action rejected."
End Sub

Private Sub Form_Open(Cancel As Integer)
Me.Filter = "(False)"
Me.FilterOn = True
End Sub
Private Sub ExitForm_Click()
On Error GoTo Err_Exit_Click


Exit Sub

MsgBox Err.Description
Resume Exit_ExitForm_Click

End Sub
Dec 3 '07 #1
Share this Question
Share on Google+
1 Reply

Expert 100+
P: 1,923
Go to the property sheet and try setting the column width of DayID to 0. That should make it "hidden" and display the next column.
Dec 9 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.