[AccessD] delete data in form

Jennifer Gross jengross at gte.net
Tue Jul 8 13:24:45 CDT 2008


If you are deleting the current record, rather than using a query, how about
using DoCmd.RunCommand aCmdDeleteRecord.

Jennifer 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Pedro Janssen
Sent: Tuesday, July 08, 2008 9:05 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] delete data in form

Jennifer,

you are right,
but i want also the possiblity to save the primary data.

Pedro


----- Original Message -----
From: "Jennifer Gross" <jengross at gte.net>
To: "'Access Developers discussion and problem solving'" 
<accessd at databaseadvisors.com>
Sent: Tuesday, July 08, 2008 7:33 PM
Subject: Re: [AccessD] delete data in form


> It sounds to me like you are adding a record to a table just to do some
> calculations, then you are deleting the record from the table.  If you are
> not wanting to save anything, why not used unbound controls?
>
> Jennifer
>
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Pedro Janssen
> Sent: Tuesday, July 08, 2008 7:04 AM
> To: AccessD
> Subject: [AccessD] delete data in form
>
> Dear AccessD members,
>
> its has been a long time ago since i asked for your help, but now i need 
> it.
>
> I have a form on which i do some calculations.
> After the calculation, i want to delete the data with a deletequery 
> through
> a macro. But when i have done that in the textbox the text: #Deleted# is
> shown.
> I have tried to refresh the form, with no result.
> Because of that i now, delete the data and close and re-open the form, by
> the code below.
> Sometimes however the inputfield are empty, and sometimes they aren't.
> How is that possible.
>
> Or is there a better way to do this.
>
>
> Thanks
>
> Pedro Janssen
>
>
>
> Private Sub cmdDelete_Click()
> On Error GoTo Err_cmdDelete_Click
>
>    Dim stDocName As String
>    Dim stLinkCriteria As String
>
>    stDocName = "mcrDelete"
>    DoCmd.RunMacro stDocName
>
>    DoCmd.Close
>
>    stDocName = "frmBerekenen"
>    DoCmd.OpenForm stDocName, , , stLinkCriteria
>
>
>
> Exit_cmdDelete_Click:
>    Exit Sub
>
> Err_cmdDelete_Click:
>    MsgBox Err.Description
>    Resume Exit_cmdDelete_Click
>
> End Sub
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>
>
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com





More information about the AccessD mailing list