Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple Delete Log error

Status
Not open for further replies.

tontenn

Vendor
Joined
Dec 29, 2006
Messages
54
Location
AU
Hi Guys

Thanks for your help so far in previous weeks with questions on my database.

This one is based around a closed thread thread702-896433.

I am trying to create a simple log so that each item that is deleted is automatically add to a log so that we can keep track of them.

I tried thread702-896433 by pasting the code into the "OnDelete" event procedure and changed the LogTable to "DeleteLog" which is an empty tabel with all fields the same as the MyTable "RawData".

Every time i try to delete an item in the form an error box comes up wanting to debug and then highlights the line where DoCmd.RunSQL strsql is.

Im not all that up with all the techincal jargon. Just hoping someone can either help me fix this code or suggest a better way to creat a simple delete log.

Cheers in advance of your help.

Tones
 
How are ya tontenn . . .

Realize the [blue]data of the current record being deleted has to be concatenated into the append query.[/blue] The technique is correct just not the data handling.

Post back the [blue]RecordSource[/blue] property of the form:
[ol][li]If its a table, [blue]list the fields and their data types[/blue].[/li]
[li]If its a query, [blue]post the SQL[/blue] of the query.[/li][/ol]
Important: If the primarykey for the underlying table of the form is [blue]autonumber[/blue] change the data type of the primarykey in DeleteLog to [blue]Number/Long Integer[/blue].

[blue]Your Thoughts? . . .[/blue]

Calvin.gif
See Ya! . . . . . .
 
Hey thanks TheAceMan1

Sorry but I really dont have the technical knowhow to understand exactly what you are telling me to do. Its probably very simple and the names are probably things I already know but just maybe not know them as that.

Are you able to expand the steps for me so I can maybe follow them right from the start.

Cheers
in advance

Tones
 
tontenn . . .

Don't know how far were gonna get with this because we really are dealing with some of the simple things in access. Find a way to get up to speed on the basics or your gonna find it all very frustrating! [mad]

[ol][li]Open the form in design view.[/li]
[li]Double-click the square box just to the left of the ruler (this brings up the properties window for the form).[/li]
[li]Click the [blue]Data Tab[/blue].[/li]
[li]Post back what you see in the [blue]Record Source[/blue] property! . . .[/li][/ol]

Calvin.gif
See Ya! . . . . . .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top