Advertisement

07.03.2008 at 01:48PM PDT, ID: 23538148
[x]
Attachment Details

How do I keep " #Deleted " from populating my form after deleting records from the Control Source table?

Asked by MarkV299 in Access Coding/Macros, Microsoft Access Database, Access Forms

I have a very simple form that I enter temperatures for a range of dates.  The fields are Date, High, and Low.  The record source is a table called tbl_HighLow.  For this particular tables function, I delete the records before entering new ones.  I run an Event Procedure On Open of the form that runs a Delete Query that clears the previous records from the table (see Code Snippet).  

When the form opens I get  " #Deleted " populating the form fields.  When I close and reopen the form, they are gone.  Can anyone show me the best way to perform this action without getting the " #Deleted " in the form?  Thanks!Start Free Trial
1:
2:
3:
4:
5:
6:
7:
Private Sub Form_Open(Cancel As Integer)
 
DoCmd.SetWarnings False
DoCmd.OpenQuery "qdel_tbl_HighLow", acViewNormal, acEdit
DoCmd.SetWarnings True
Form.Refresh
End Sub
[+][-]07.03.2008 at 01:49PM PDT, ID: 21928929

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Access Coding/Macros, Microsoft Access Database, Access Forms
Sign Up Now!
Solution Provided By: DatabaseMX
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628