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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ms access 2010 full of code errors and bugs

Status
Not open for further replies.

Panchovia

Programmer
May 6, 2010
48
CW

I have converted my database to ms access 2010.

The following code worked ok sunddenly I get an error 2467.(one of the many)

Private Sub form_beforeUpdate(cancel An Integer)

If me.Quantity = 0 then
Docmd.unCommand AcCmdUndo
Else

Datemodified = Date
Timemodified = Time()
Users = Fosusername()

End If
End Sub

Although I get the correct results on the transactions form and in the transactions table when saving I still get an error message code 2467 how can this be possible.

Access 2010 seems full of bugs and error code messages.



 
Correction I made a mistake when submitting the thread

DoCmd.Runcommand AcCmdUndo

Panchovia
 
is this a typo
Code:
Docm[COLOR=red]d.u[/color]nCommand AcCmdUndo

SB

Code:
Docm[COLOR=green]d.[b]r[/b]u[/color]nCommand AcCmdUndo
 
How are ya Panchovia . . .

If your going to use [blue]UnDo[/blue] you need to set the [blue]Cancel[/blue] arguement as well:
Code:
[blue]   [purple][b]Cancel = True[/b][/purple]
   DoCmd.Runcommand AcCmdUndo[/blue]
[blue]Your Thoughts? . . .[/blue]

See Ya! . . . . . .

Be sure to see faq219-2884 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Ensure at the top of all modules you have
Option Explicit

This will catch a lot of coding errors, before compiling. The erro 2467 is
"The Expression you entered refers to an object that is closed or
doesn't exist"

You did not say which line, but if any of these are not properties of the form then you would get the error

Quantity
Datemodified
Timemodified
Users

 
Try Compile<yourdbName> from the Debug Menu in the code window and check for missing references from Tools > references

Zameer Abdulla
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top