473,399 Members | 3,888 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,399 software developers and data experts.

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 1594
Requery sounds like the right approach.

Did you requery form in the subform control, i.e.:
Me.[NameOfYourSubformControlHere].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.google.c om...
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*********@SeeSig.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.[NameOfYourSubformControlHere].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.google.c om...
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
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...
10
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...
5
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
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'...
11
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...
3
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...
2
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...
11
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,...
4
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...
7
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...
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: 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
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
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,...
0
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...

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.