• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 630
  • Last Modified:

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

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
GTC-KTX
Asked:
GTC-KTX
  • 3
  • 3
1 Solution
 
peter57rCommented:
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
 
GTC-KTXAuthor Commented:
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
 
peter57rCommented:
What is the recordsource for your form?
(If it's a query please post the sql view)
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
GTC-KTXAuthor Commented:
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
 
peter57rCommented:
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
 
GTC-KTXAuthor Commented:
thanks for the help Peter  
that makes sense
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now