473,748 Members | 8,779 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Need help with creating a customized search form

1 New Member
Hello,

I'm currently in the process of creating a small access database and I'm having some problems with creating a customized search. I would like the user to be able to search a record by last name or street address. I have two questions:

1. I am currently using the built in "find and replace" dialog box, which works fine for the most part, but I need to be able to add some code to make the search more customized. I'm new to access, so my VBA skills are still limited. I have been unable to find code examples that are similar to the "find and replace" dialog box. Does anyone have code examples that might be similar?

2. I also tried adding two combo box search options on my form (one for last name and one for street address). The last name search works fine, but to do a search by street address, I must enter the street number first, or I get an error. I would like to be able to enter the street name (or better yet, part of the street name) first. Here is the code that I;m currently using:

Me.RecordsetClo ne.FindFirst "[ID] = " & Me![Addressdropdown]
Me.Bookmark = Me.RecordsetClo ne.Bookmark

Any help or code examples would be appreciated.

teephish
Feb 15 '08 #1
3 2503
blad3runn69
59 New Member
hey there
you can find an excellent tutorial/example provided by allen browne here
how to build a search form which can handle multiple criteria
Feb 16 '08 #2
Jim Doherty
897 Recognized Expert Contributor
Welcome to the scripts! and fun honing your VBA skills.

Have a look at this example db I knocked up for newbies to give an idea on one technique that provides for multi field searching in combination with a wildcard thrown in if needed. It is fairly complex to look at particularly if you are new but as you develop your skills and if you are persistent and break each code segment down and follow it through you will see one or two other helpful things.

Included is the ability to output the resultset to excel and also output a listboxs rowsource using an intermediary dialog box, set a reports recordsource on the fly based on the search return, open a form to a particular form record from an existing form record, display a custom please wait message centrally on screen, use conditional formatting based on a row value

Regards

Jim :)

Footnote: Whilst the attachment works completely fine in Access versions prior to 2007 Having since tested the attachment out on Access 2007 I note that subform recordsources when set on the fly fail to set properly and only returns the first record as opposed to the expected continuous list.
Attached Files
File Type: zip searchdemo.zip (194.9 KB, 383 views)
Feb 16 '08 #3
blad3runn69
59 New Member
hey Jim, lotta stuff going on there, thank you for sharing! :)
Apr 22 '08 #4

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

Similar topics

0
1915
by: MSM | last post by:
Hello, This may be posted twice if so i apologize. I am creating a form using php where the information entered into the form will go into a database. When creating the tables in SQL where do I place the code for creating the tables? How do I link the form's information to the tables. Any help with this would be greatly appreciated. Below is the code for the form I hope this can assist you in helping me. Thank you so much. //here it...
2
2036
by: Derek Jones | last post by:
I am currently working on an application for our Business Office to easily search for new budget codes that we have to establish due to an administrative system conversion we are currently undergoing. They would like to be able to find a new code via searching by old code or searching by the object name. I have the search by old code form done exactly the way they want it. For the search by object name form, I have it set up with a...
16
2208
by: Joel Finkel | last post by:
Folks, I am confused as to how to implement the following solution. I have a series of processing steps, each of which contains similar features (forms, etc). Therefore, I create a base class, Step, and subclass from that for specific steps. The Step class has a method, Execute(), which can return either Success or Failure. I have a Step Driver, which instantiates the first Step, calls its Execute()
20
2885
by: Jason Dravet | last post by:
Some time ago I wrote an application that controls the projectors in our classrooms(turn on, turn off, and volume control). This application is written in VB.net 2003. It was working perfectly until XP SP2 was installed on the PCs. Now when the power on or power off button is pressed the following message is displayed: An unhandled exception has occurred in your application. If you click Continue, the application will ignore this...
3
2657
by: hazly | last post by:
I'm very new in the web technology and need advice on search engine. I want to develop a portal using PHP and MySQL on Linux. Need to know on the following features : 1. search engine that could search my portal (mySQL, PDF, Ms Word & others) 2. search engine that could search to few web sites specified by user/programmer
3
3017
by: cuties | last post by:
Hi all.... i'm very new to this programming language. i'm required to fulfill this task in the company i'm doing my practical. i hope i can get guide for my problem... Here is the script i already wrote but i'm having problem to move forward. my problem is : 1. how do i assign each checkbox to have equal value with the value of the d_id?
9
3942
by: pic078 via AccessMonster.com | last post by:
I need serious help - I have a frontend/backend Access database (2 MDE Files) that remains stuck in task manager after exiting the application - you can't reopen database after exiting as a result - I have read every post out there and spent hours trying to figure out the problem with no success whatsoever - I have constrained the problem to one form however, and I think it's hiding somewhere in my code associated with this form, which is...
2
3156
by: sorobor | last post by:
dear sir .. i am using cakephp freamwork ..By the way i m begener in php and javascript .. My probs r bellow I made a javascript calender ..there is a close button ..when i press close button then the calender gone actually i want if i click outside off the calender then it should me removed ..How kan i do this ... Pls inform me as early as possible .. I am waiting for ur quick replay ...Here i attached the source code .... <!DOCTYPE...
1
1602
by: David De | last post by:
Need help with my site - search function within my site not working?!? I purchased this template, customized it and found out it has a search function for within the site - the challenge is that SEARCH function is a dummy text box and doesn't work (apparently I have to pay much more to get it to work). I want to get it to work, but I am unsure how to do it on my own, hopefully nothing too complicated. The banner is in FLASH, so I am...
0
9537
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9367
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9319
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9243
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8241
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6073
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4599
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4869
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2213
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.