473,626 Members | 3,310 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.Text1 8) Then
lstnme = Me.Text18
DoCmd.OpenForm "frmSearch_Resu lts", , , "[last_name] = '" &
lstnme & "'"
Forms![frmSearch_Resul ts].[Source_Control] = srce
DoCmd.Close acForm, "frmCustomer_Se arch", 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 1407

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

Similar topics

12
2378
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 field... This grid displayes results based on users search.. public static int numberDiv; private void Page_Load(object sender, System.EventArgs e) {
0
1914
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 opened in a report, sometimes the chart shows the design view data and not the data from the query. If the report is closed then reopened, more often than not it will show the correct data. This is a serious flaw in Access and makes an otherwise...
4
1582
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 the record is available. Tried a few that seems to make sense but I believe I am missing something obvious.
9
2329
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 is a Judge Table (information about judges) judgeID = autonumber key
4
2141
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 action=supers_NxtlUpdate.asp> <% Do While Not objRecordset.EOF
0
1125
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 approached it like this. Created a form which I'll call 'view' form 1) View Form has these propertis - Allow filters / edits No Deletions / additions / Data entry / Snapshot / No locks / Fetch defaults Yes Seems to stop anyone doing anything...
0
14410
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 be greater than 255 characters. 2. I have an access database. I link (not import) to the contents of the excel spreadsheet. In the design view in access, Column A has the data type "memo".
0
8301
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 records there is an error "Incorrect syntax near '-'. Must declare the scalar variable "@UserName". I worked out in design view,code is automatically generated.Iam not able fix the error. Iam working with Visual Web Developer-2005 Express Edition
1
1529
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 handling as application built in MS Access,where user updates some information say for example expenses, and the expenses entered will be summed up for every transaction and that total will be shown in a sub form which is integrated in the main form.If...
0
8272
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8205
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8713
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
8644
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
8370
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
7206
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...
1
6126
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4094
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
4208
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.