473,385 Members | 2,004 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,385 software developers and data experts.

how do i redo a combo box lookup if a parameter is entered wrong?

I have built a database where you click on the combo box lookup button and you are prompted to enter a series of queries in order to filter out the desired search result. My problem is that when I enter a wrong value in any of my parameters I get a blank result, and then I can no longer redo the search.So, how do I redo my parameter search by clicking on the lookup button again? I would really appreciate some help here. Thanks
Sep 24 '10 #1
2 1447
MOCaseA
34
Please post the code you are using.
Sep 24 '10 #2
MOCaseA
34
Here is an example of a filtering system I used:

Expand|Select|Wrap|Line Numbers
  1. Private Sub CAR_AfterUpdate()
  2.     SetFilter
  3. End Sub
  4. Private Sub Date_AfterUpdate()
  5.     SetFilter
  6. End Sub
  7. Private Sub System_AfterUpdate()
  8.     SetFilter
  9. End Sub
  10. Private Sub System_POC_AfterUpdate()
  11.     SetFilter
  12. End Sub
  13. Private Sub SetFilter()
  14.     Dim FilterCriteria As String
  15.     If CAR & "" <> "" Then FilterCriteria = FilterCriteria & " AND [CAR]='" & CAR & "'"
  16.     If Date & "" <> "" Then FilterCriteria = FilterCriteria & " AND [Date]='" & Date & "'"
  17.     If System & "" <> "" Then FilterCriteria = FilterCriteria & " AND [System]='" & System & "'"
  18.     If System_POC & "" <> "" Then FilterCriteria = FilterCriteria & " AND [System POC]='" & System_POC & "'"
  19.     If FilterCriteria = "" Then
  20.             Me.FilterOn = False
  21.     Else
  22.         FilterCriteria = Mid(FilterCriteria, 6) 'REMOVE THE LEADING " AND "
  23.         Me.Filter = FilterCriteria
  24.         Me.FilterOn = True
  25.     End If
  26. End Sub
I then made each Filter box into a combo box with the row source being the particular field that I was filtering and no control source. To keep the clutter down I also changed "SELECT" to "SELECT DISTINCT" and then selected yes in the "limit to list" option (to prevent anyone from mistyping anything. It tells the user no matching record found and stops the query until corrected). Not perfect, but functional.
Sep 24 '10 #3

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

Similar topics

0
by: Dirk Zimmermann | last post by:
Hi! I have a problem in a program. And I don't understand what is going on. I can code something, that the "error" doesn't occur anymore. But I still don't know the reason and this is...
4
by: martin | last post by:
Can anyone please help. I have a main membership form/table that has a subform with function table linked. This is obviously a fixed solution but I would like to make it more dynamic with a combo...
8
by: alsemgeest | last post by:
Hi, I'd like to make my own very simple autorisation system. Just a table: tblUsers (user and pw). Next I need a form with user and pw in textbox, with an OK button. If the lookup fails: msgbox...
2
by: Andrew W | last post by:
Hi All, I have two combo boxes: Parameter and SensorComponent. When Parameter is changed, I want SensorComponent to requery & dropdown. It does requery & dropdown, but it drops down for...
0
by: Jim Andersen | last post by:
I am using Microsoft.ApplicationBlocks.Data (v 2.0.0.0). I have this parameter array I pass to a stored procedure. The last one is an output parameter. So I did this: Line 1: arParms(8) = New...
0
by: ngoodearl | last post by:
Hi, I have upsized an access db to a sequel 2000 db. The db is used to perform a series of calculations to get a result. The user inputs the required parameters into a form and the data entered is...
1
by: priyakollu | last post by:
hi guys! please help me in this prob ..while installing .net i have entered wrong serial number....still the installation process continued and whole thing got installed .......but when im trying to...
13
BigToe
by: BigToe | last post by:
Hello, if anyone out there can shed light on the fact that when a last name is selected in a combo box, and that name is shared by more than one person, why access is displaying the first record in...
3
by: ilikebirds | last post by:
I am looking for a way to have one combo lookup drop down to autopopulate with multiple items based off another combo lookup. I've tried Me!rc1 = DLookup("", "", "Reject_Reason_1='" &...
2
by: sierra7 | last post by:
It seems Access 2010 is associating an 'input mask' or field type with a combo box when a form is opened, even though there is no Format setting on the control. I have a form which has been...
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: 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: 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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.