473,396 Members | 1,785 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,396 software developers and data experts.

Incorrect data on opened form based on SQL View

I have a form that has a search button on it. The form has three text boxes,
last name, first name, and bidder number. I put in a last name and click the
search button. Clicking the search button opens another form based on a SQL
view.

What is supposed to happen is the search results form opens based on the
information entered in one of the controls (Last Name, First Name, Bidder #)

Here is the code:

===Begin Code===
If Not IsNull(Me.Text18) Then
lstnme = Me.Text18
DoCmd.OpenForm "frmSearch_Results", , , "[last_name] = '" &
lstnme & "'"
Forms![frmSearch_Results].[Source_Control] = srce
DoCmd.Close acForm, "frmCustomer_Search", acSaveNo
Exit Sub
End If
===EndCode===

What actually is happening is the results form opens, but NOT with the name
I have entered. The If statement above has two other else section that are
the same except that they check for either first name or bidder # entries.
The open form command has the WHERE section surrounded by single quote
marks. No matter what I put in the last name control on the search form it
comes back with the last name Bollman.

How do I get the form to open based on the name I put in?

Thanks in advance!

Mike
m b charney at sbcglobal dot net

Nov 13 '05 #1
0 1398

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: pmud | last post by:
Hi, I am using teh following code for sorting the data grid but it doesnt work. I have set the auto generate columns to false. & set the sort expression for each field as the anme of that...
0
by: Wayne Aprato | last post by:
I have seen the following problem mentioned here before but have not as yet seen a fix that works. When a chart is opened in form view everything is OK. When a chart based on the same query is...
4
by: Ben McLaurin | last post by:
When oopeening a form based of a table I need to run a function to do some calculations. Which form event do I need to use that will automatcally run when the form is opened but all the data from...
9
by: Susan Bricker | last post by:
Greetings. I am having trouble populating text data that represents data in my table. Here's the setup: There is a People Table (name, address, phone, ...) peopleID = autonumber key There...
4
by: Matt | last post by:
I have the following in a page and I am trying to update a record on the next page but for some reason the form data is not carrying over. Any ideas why? <form name=nxtlupdate method=post...
0
by: JohnM | last post by:
I've produced a database to store data on behaviour incidents in our school. I'm having problems ensuring all staff can view and some staff edit. (I don't need the complex proper security) I...
0
by: Grip | last post by:
Hi, I have gone throught the group and Microsoft's online help and have seen many suggestions but I am still seeking clarity: 1. I have an excel spreadsheet. Column A contains text that may...
0
by: roamnet | last post by:
hi i created database file with .mdf extention ,sql server as a source and use grid view to display data there're no problem in data retrieve and display,but i want to edit it or insert new...
1
by: vvasnm | last post by:
Hi This is surya, I am struggling with one issue regarding the updation of the value in the sub form ,when the related data has been deleted from the data sheet view of the main form. I am...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
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
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,...
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...
0
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...
0
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,...

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.