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

Stop a form from updating a table

Hi all- I'm currently using a form to look up records based on a few fields. Problem is, it's overwriting the first record in the table! Is there a way to avoid this, or should I write code to restore the original value every time a search occurs? (It's not every time a search occurs, but whenever the record is no longer being edited, whether in form view or when it's clicked away from in the table itself.)
Jun 30 '15 #1
3 1425
NeoPa
32,556 Expert Mod 16PB
I'm afraid that's only happening because you've designed your form wrong.

Have a look at Example Filtering on a Form and Cascaded Form Filtering for help doing it as you'd want it to work. There should never be any situations where the existing data gets updated as part of the search/filter process.
Jun 30 '15 #2
Sorry, don't know if I was unclear or if I'm just not understanding the given links... I have a form that consists of 5 dropdown menus. The top one uses an SQL query to get all of the distinct values in the manufacturer field of a table. The second gets all distinct values in the supplier field that also have the selected manufacturer. The next gets all the part numbers with those manufacturer and supplier values. There isn't any code on these comboboxes except to requery when something changes.
Also, how does one make unbound comboboxes...? Very sorry...
Jun 30 '15 #3
NeoPa
32,556 Expert Mod 16PB
My suspicion, and only that at this point, is that you're using bound controls and that's what's causing your problem. A bound control is any one that has a value in the .ControlSource property that specifies a field from the form's recordset (That which the form is bound to via its .RecordSource property).

RadioWriter:
Also, how does one make unbound comboboxes...?
To convert a bound control to an unbound control it is simply necessary to remove any value from the .ControlSource property. What this means in a practical sense is that whenever a new value is entered into, or selected from, this control it will have no effect on any existing data. IE. No changes will be made to data through changing or selecting any values in this control.
RadioWriter:
Very sorry...
Please don't be. Not knowing all the details is where we all start from. It's a sensible starting position. It's where we go from there that matters - and even then only if it's a subject we're interested in.
Jul 1 '15 #4

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

Similar topics

2
by: Bill Hand | last post by:
Is it possible to open a form from table and have it access a given record? I want to be able to query all baseball cards with the last name Jones and have it open a table. In each record of...
1
by: Jason Wood | last post by:
Hi everyone, I've a simple table containing member details. I've written a SELECT to select all the members. I've based the form on this select, using the from wizard. Once built I've...
6
by: Winshent | last post by:
How do you stop form information being stored such as credit card info in a textbox?
3
by: Roger Withnell | last post by:
I have a framed website. I plan to include in default.asp a routine to check if the annual subscription is due from the records in the People table. If so, then the routine would send emails...
0
by: AJang | last post by:
I write a windows form application. In this application, I perform some operation on each file of a directory. For monitoring , I update one TextBox control's Text with the filename which is being...
3
by: KayC | last post by:
Hi Background info: I am running Access 2000 I have a form bound to a blank table When a user clicks a button the form opens in datasheet view User enters data into form and closes form User...
0
by: abhishekjethwani | last post by:
How to write a query to access tree structure form multi table. I m having five tables from them first table give me a data which act as the parameter for query for the second table and the two...
2
by: rpjd | last post by:
I am trying to submit entries in a form to a database. I am using " within my submission form and $_POST I am getting the connection to the database but I my script is not executing,...
4
by: AlexNunley | last post by:
I've adopted a moderately sized (65k records) active use database (Access 2000, Windows XP). One of the most commonly used forms is whats called the RMA generation field, used to add claim...
4
by: Light1 | last post by:
I am working in Access 2003. I have a form that pulls information from a couple of tables. When the user chooses a selection from the dropdown menu of a combo box, it is putting that information...
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: 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
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.