473,386 Members | 1,846 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Search Form Appearence

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."
Else
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
Next

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


DoCmd.Close

Exit_ExitForm_Click:
Exit Sub

Err_Exit_Click:
MsgBox Err.Description
Resume Exit_ExitForm_Click

End Sub
Dec 3 '07 #1
1 1057
puppydogbuddy
1,923 Expert 1GB
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

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

Similar topics

1
by: Les Juby | last post by:
A year or two back I needed a search script to scan thru HTML files on a client site. Usual sorta thing. A quick search turned up a neat script that provided great search results. It was fast,...
2
by: CharitiesOnline | last post by:
Hello, I have set this script up to add paging to a search results page. Which on the first page works fine. I calculates how many pages there should be depending on the number of results returned...
1
by: N. Graves | last post by:
Hi, I want to have a Search Dialog box that has several text box and fields to build a search and display the results in a form. I can do everything that I need to if I us a report but I would...
8
by: Steph | last post by:
Hi. I'm very new to MS Access and have been presented with an Access database of contacts by my employer. I am trying to redesign the main form of the database so that a button entitled...
5
by: Paul Taylor | last post by:
Hi all, I'm writing an app in VB.NET and want it to look and behave like a typical application wizard (i.e. with the usual Next, Cancel, Back etc). Should I be looking to use multiple forms or...
2
by: Peted | last post by:
Hi Im using c# express edition 2005 I have an MDI form, where i load multiple child forms from a dll i create, using reflection and late binding The child forms have multiple radio...
8
by: shruthiKKKK | last post by:
change appearence for textbox by using combolist
2
by: Mark | last post by:
Hi All, I am creating a music database for a friend and have run into a problem. Within the ALBUM table, I wanted to store the ARTIST_ID rather than the ARTIST_NAME. To do this, I intended to have...
12
by: iahamed | last post by:
Hi Everyone, I got two parts of my advance search to work, I am running out of Logic to connect the third. My mind is in swing! Pleaseeeeeeeee Help me. I have 3 Fiels to search, the First two...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.