473,809 Members | 2,718 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with Deleted Records

Bob
I have a form, and a subform based on a query. I want to delete
specific records from my table based on certain conditions. I mean,
when the user adds a new record to the subform, the form saves the
record on the table, now if, for example, user decides to change the
JobNumber, there is a query that runs to delete the old jobnumber and
related data from the table. But the problem is, when It deletes the
records, "Deleted" appears in all the fields in the form and user will
not be able to do anything. I tried to requery the subform, but it
dosn't work. How can I have this form clean and ready to input data
after the old data has been deleted?
Thank you
Nov 13 '05 #1
2 1619
Requery sounds like the right approach.

Did you requery form in the subform control, i.e.:
Me.[NameOfYourSubfo rmControlHere].Form.Requery

Did you get an error message? Does your subform control have a different
name name than its SourceObject?

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Bob" <ba******@gmail .com> wrote in message
news:b6******** *************** ***@posting.goo gle.com...
I have a form, and a subform based on a query. I want to delete
specific records from my table based on certain conditions. I mean,
when the user adds a new record to the subform, the form saves the
record on the table, now if, for example, user decides to change the
JobNumber, there is a query that runs to delete the old jobnumber and
related data from the table. But the problem is, when It deletes the
records, "Deleted" appears in all the fields in the form and user will
not be able to do anything. I tried to requery the subform, but it
dosn't work. How can I have this form clean and ready to input data
after the old data has been deleted?
Thank you

Nov 13 '05 #2
Bob
I tried to requery the form in both the form and the subform, none of
them worked. Also my subform does not have different name. everytime I
tried to do the requery, I got error. then I used some error handlings
in where I was requering the form,( On error goto etc..) and it
worked!!

"Allen Browne" <Al*********@Se eSig.Invalid> wrote in message news:<41******* *************** *@per-qv1-newsreader-01.iinet.net.au >...
Requery sounds like the right approach.

Did you requery form in the subform control, i.e.:
Me.[NameOfYourSubfo rmControlHere].Form.Requery

Did you get an error message? Does your subform control have a different
name name than its SourceObject?

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Bob" <ba******@gmail .com> wrote in message
news:b6******** *************** ***@posting.goo gle.com...
I have a form, and a subform based on a query. I want to delete
specific records from my table based on certain conditions. I mean,
when the user adds a new record to the subform, the form saves the
record on the table, now if, for example, user decides to change the
JobNumber, there is a query that runs to delete the old jobnumber and
related data from the table. But the problem is, when It deletes the
records, "Deleted" appears in all the fields in the form and user will
not be able to do anything. I tried to requery the subform, but it
dosn't work. How can I have this form clean and ready to input data
after the old data has been deleted?
Thank you

Nov 13 '05 #3

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

Similar topics

20
2698
by: Neil | last post by:
I have an Access 2000 MDB file with a SQL 7 back end. I have a main table with 50,000 records; and I have a selections table with 50,000 records for each machine that uses the database (about 25-50). This allows each user to have their own set of selections. The selections table has three fields: ID (int), Sel (bit), MachName (varchar). ID and MachName comprise the primary key. I have a view that combines the main table and the entries...
10
2816
by: DaveDiego | last post by:
I've had a user delete one of the client records, I do have a version of the DB with all records intact before the deletion occured. Whats the best approach to getting all the related records in each of the tables? I have about 12 tables to put data back into and multiple records for each. Would I need to make an append or update query for each table?
5
29019
by: Grant | last post by:
Hi Is there a way to recover deleted records from a table. A mass deletion has occurred and Access has been closed since it happened Louis
8
1704
by: Ondine | last post by:
Hi I have a client running an Access 2000 database on a small network with 3 pc's. Two of the laptop pcs have a data replica, which they use when not connected to the network, the 'server' being the 3rd machine. The other day they reported that 'suddenly' a whole load of data that they had entered (on to the 'server' main data) that day had 'disappeared'. Not only had the new data gone, but updates performed
11
2255
by: Siv | last post by:
Hi, I seem to be having a problem with a DataAdapter against an Access database. My app deletes 3 records runs a da.update(dt) where dt is a data.Datatable. I then proceed to update a list to reflect that the 3 items have been deleted only to discover that the 3 items appear, however when I click on them to display their information which runs a datareader over the same database it appears that the data has now gone. I wondered whether...
3
2329
by: BrianDP | last post by:
I have a database with a split front end/back end. There is a key table in the back end called Catalog, and it is sort of a central key table for all sorts of things. It's a list of all the jobs that have ever been worked on at our company. Records are getting lost out of this table, but I have no way of figuring out how they're being deleted. Records should NEVER be deleted out of this table. They can be marked as inactive, or...
2
3199
by: paula | last post by:
I have a front-end access database that uses a sql server back-end to link the tables. When I run the following code, the subform displays #deleted in place of the deleted record. What am I doing wrong??? s = "DELETE WMS_FID FROM WHERE =" & Me.txt_WMS_FID domcd.RunSQL (s) '*** PMP 9/22/07 - Copy the records to be deleted from t_PID to t_PID_Deleted table
11
4086
by: Ed Dror | last post by:
Hi there, I'm using ASP.NET 2.0 and SQL Server 2005 with VS 2005 Pro. I have a Price page (my website require login) with GridView with the following columns PriceID, Amount, Approved, CrtdUser and Date And Edit and Delete buttons
4
7347
codemama
by: codemama | last post by:
I have created xml files in C# using the DataSet ds.WriteXml method. I now need to take an xml file and be able to do an insert or delete to a table in MS Access. How would I go about that? Do I have to load the XML into a DataSet and then Create command parameters based on the records in the Dataset or is there a simpler way to do this? Thanks
7
5764
by: ravindarjobs | last post by:
Hi all, i am using ms access 2003, i have a form, i connect to the mysql database using adodb connection. this works fine. but when i delete a record, it is deleted but still the record set shows that record. when i close the application and again run it, then the record set dosnt show the delted record. what could be the problem
0
9721
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
9602
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
10639
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
10376
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...
0
10120
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
9200
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
5688
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3015
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.