473,320 Members | 2,145 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,320 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 1418
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: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.