?
Solved

Microsoft Access - Delete records from input form, but they don't appear to delete from table

Posted on 2009-04-17
6
Medium Priority
?
626 Views
Last Modified: 2013-11-29
I have a microsoft access table called "keystoneopportunities"
I have an input form for this table called "opportunityInput"
I've added record navigation and operation buttons on the input form
when i use the "delete record" operation button that i added, it appears to work because when i use the record navigation buttons to navigate sequentially through the records, that particular record that i deleted doesn't show up anymore.  In fact, the only records that i had in the "keystone opportunity" database were about 5 test records used during development, so i deleted all of these 5 records.  I then went to the actual "keystoneopportunity" table to make sure everything was gone, and in fact the records are still there.  I even hit "refresh all" while viewing the table.  Not sure why i can still see the records.  When i go back to the "opportunityinput" form and use the navigation buttons, the records appear to be gone.  Can anyone help me understand what is going on?
0
Comment
Question by:GTC-KTX
  • 3
  • 3
6 Comments
 
LVL 77

Expert Comment

by:peter57r
ID: 24169459
Assuming you created the Delete button using the controls wizard, then it sounds like your form is not based on the table you thought it was.
0
 

Author Comment

by:GTC-KTX
ID: 24169495
When i add a new record and hit "refresh all" while viewing the table, i see the new record show up.  So it does appear to be based on the proper table.
0
 
LVL 77

Expert Comment

by:peter57r
ID: 24169823
What is the recordsource for your form?
(If it's a query please post the sql view)
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

Author Comment

by:GTC-KTX
ID: 24170086
Peter,
I've attached the code below from the recordsource.  Its rather lengthy.
SELECT keystoneopportunities.BDR_Generated, keystoneopportunities.ID, keystoneopportunities.Opportunity_Title, keystoneopportunities.Customer, keystoneopportunities.Salesman, keystoneopportunities.Commodity, keystoneopportunities.Rating, keystoneopportunities.How_Found, keystoneopportunities.Probability, keystoneopportunities.businessdescription, keystoneopportunities.Comments, keystoneopportunities.Customer_Acct_no, keystoneopportunities.Rate_Class, keystoneopportunities.Demand_KW, keystoneopportunities.Yearly_Usage_KWh, keystoneopportunities.Current_Supplier, keystoneopportunities.Current_Contract_expires_on, keystoneopportunities.Current_Broker, keystoneopportunities.Supplier1_name, keystoneopportunities.Supplier1_term1_duration_months, keystoneopportunities.Supplier1_price_term1_centsperKWh, keystoneopportunities.Our_markup_for_Supplier1_price_term1_mils, keystoneopportunities.Is_our_markup_included_in_Supplier1_price_term1, keystoneopportunities.Supplier1_Price_Term1_expires_on, keystoneopportunities.Supplier1_term2_duration_months, keystoneopportunities.Supplier1_price_term2_centsperKWh, keystoneopportunities.Our_markup_for_Supplier1_price_term2_mils, keystoneopportunities.Is_our_markup_included_in_Supplier1_price_term2, keystoneopportunities.Supplier1_Price_Term2_expires_on, keystoneopportunities.Supplier1_term3_duration_months, keystoneopportunities.Supplier1_price_term3_centsperKWh, keystoneopportunities.Our_markup_for_Supplier1_price_term3_mils, keystoneopportunities.Is_our_markup_included_in_Supplier1_price_term3, keystoneopportunities.Supplier1_Price_Term3_expires_on, keystoneopportunities.Supplier2_name, keystoneopportunities.Supplier2_term1_duration_months, keystoneopportunities.Supplier2_price_term1_centsperKWh, keystoneopportunities.Our_markup_for_Supplier2_price_term1_mils, keystoneopportunities.Is_our_markup_included_in_Supplier2_price_term1, keystoneopportunities.Supplier2_Price_Term1_expires_on, keystoneopportunities.Supplier2_term2_duration_months, keystoneopportunities.Supplier2_price_term2_centsperKWh, keystoneopportunities.Our_markup_for_Supplier2_price_term2_mils, keystoneopportunities.Is_our_markup_included_in_Supplier2_price_term2, keystoneopportunities.Supplier2_Price_Term2_expires_on, keystoneopportunities.Supplier2_term3_duration_months, keystoneopportunities.Supplier2_price_term3_centsperKWh, keystoneopportunities.Our_markup_for_Supplier2_price_term3_mils, keystoneopportunities.Is_our_markup_included_in_Supplier2_price_term3, keystoneopportunities.Supplier2_Price_Term3_expires_on, keystoneopportunities.Supplier3_name, keystoneopportunities.Supplier3_term1_duration_months, keystoneopportunities.Supplier3_price_term1_centsperKWh, keystoneopportunities.Our_markup_for_Supplier3_price_term1_mils, keystoneopportunities.Is_our_markup_included_in_Supplier3_price_term1, keystoneopportunities.Supplier3_Price_Term1_expires_on, keystoneopportunities.Supplier3_term2_duration_months, keystoneopportunities.Supplier3_price_term2_centsperKWh, keystoneopportunities.Our_markup_for_Supplier3_price_term2_mils, keystoneopportunities.Is_our_markup_included_in_Supplier3_price_term2, keystoneopportunities.Supplier3_Price_Term2_expires_on, keystoneopportunities.Supplier3_term3_duration_months, keystoneopportunities.Supplier3_price_term3_centsperKWh, keystoneopportunities.Our_markup_for_Supplier3_price_term3_mils, keystoneopportunities.Is_our_markup_included_in_Supplier3_price_term3, keystoneopportunities.Supplier3_Price_Term3_expires_on, keystoneopportunities.Action_Rqd, keystoneopportunities.Open_Date, keystoneopportunities.Distribution_co, keystoneopportunities.PTC, keystoneopportunities.State, keystoneopportunities.SIC_Code, keystoneopportunities.Gas_LDC, keystoneopportunities.[Gas Supplier], keystoneopportunities.Gas_Acct_no, keystoneopportunities.Supplier1_sentLOA, keystoneopportunities.Supplier1_sentDATA, keystoneopportunities.Supplier1_receivedPRICE, keystoneopportunities.Cust_Signed_LOA, keystoneopportunities.Req_Cust_Data, keystoneopportunities.Rcvd_Data, keystoneopportunities.Supplier2_sentLOA, keystoneopportunities.Supplier2_sentDATA, keystoneopportunities.Supplier2_receivedPRICE, keystoneopportunities.Supplier3_sentLOA, keystoneopportunities.Supplier3_sentDATA, keystoneopportunities.Supplier3_recievedDATA, keystoneopportunities.Current_Contract_expires_on, keystoneopportunities.Gas_Rt_Schedule, keystoneopportunities.Gas_Yearly_Usage_MCF, keystoneopportunities.supplier_chosen, keystoneopportunities.term_chosen, keystoneopportunities.we_signed_customer, keystoneopportunities.est_start_electric, keystoneopportunities.est_end_electric, keystoneopportunities.sales1, keystoneopportunities.sales2, keystoneopportunities.sales3, keystoneopportunities.sales4, keystoneopportunities.percent_to_sales1, keystoneopportunities.percent_to_sales2, keystoneopportunities.percent_to_sales3, keystoneopportunities.percent_to_sales4, keystoneopportunities.percent_to_BDR, keystoneopportunities.sales5, keystoneopportunities.percent_to_sales5, keystoneopportunities.MeterRead_Date, keystoneopportunities.Gas_MeterRead_Date, keystoneopportunities.Est_Mthly_rev, keystoneopportunities.Est_Com_tot, keystoneopportunities.Est_Com_S1, keystoneopportunities.Est_Com_S2, keystoneopportunities.Est_Com_S3, keystoneopportunities.Est_Com_S4, keystoneopportunities.Est_Com_S5, Phone_LOG.ID AS ID_Phone_LOG, Phone_LOG.opportunityID, Phone_LOG.CallDate, Phone_LOG.Call_Direction, Phone_LOG.ConvSummary
FROM keystoneopportunities LEFT JOIN Phone_LOG ON keystoneopportunities.ID = Phone_LOG.opportunityID;

Open in new window

0
 
LVL 77

Accepted Solution

by:
peter57r earned 2000 total points
ID: 24174582
Right - I see what 's happening here.
Your query is based on two tables.
The deletions you are actually doing are deletions from the Phone_log table, not from the Keystoneops table unless you are dealing with a Keystoneops record which has no related records (so the phone-log fields will be blank in the query results).  Deleting a record which has no related records wWILL delete the Kestoneops record, buut while there are matching Phone_log records you will delete those and leave the keystoneops record intact.
0
 

Author Closing Comment

by:GTC-KTX
ID: 31571536
thanks for the help Peter  
that makes sense
0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
We live in a world of interfaces like the one in the title picture. VBA also allows to use interfaces which offers a lot of possibilities. This article describes how to use interfaces in VBA and how to work around their bugs.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question