Scenario: I have a system that has been working for some while.I need to add a new function involving gathering information into a temporary table.I have reduced the problem to the bare essentials described below.This is driving me mad!! What am I doing wrong.
I do the following:
- Create a simple table with just a couple of fields. I don't change any defaults.
- Create a simple form using the form wizard. I don't change any defaults.
- Open the form in design mode and 1) set the default view to split view; 2) specify an ON OPEN event in VBA which just has the one line 'DoCmd.RunSQL ("Delete * from TestTable")'
- Save and close the form
- Open the form and enter a few records
- Close the form
- Open the form. Now I see 1 record #deleted. I can enter 1 record but no more - the new button is not active.
- Close the form.
- Open the form. No records show and I can enter records as expected but next time round I get the #deleted problem.
I seem to have to close and open the form twice to clear things out.
System and usage:
- This is a standalone system.
- The table is not linked although there are other tables in this application that are linked.
- There are no other users.
- Windows 11
- Microsoft Office Professional 2019
- Microsoft® Access® 2019 MSO (Version 2310 Build 16.0.16924.20054) 64-bit
if you might of been using a function with some variables in it like this
function(cat, dog)the order does mater because if you gave it dog first and then cat last it would switch the two values so then if cat = 1 and dog = 2 then in that order cat would = 2 and dog would = 1. so try flipping them around.