Modifying the Standard Inventory DB to allow for individual items?

S

Swin

Thanks very much for this. I completely redid the data structure today as it
wasn't making sense. I have one more issue again I suspect it is relativly
stright forward. Sorry to be a pain.

I want to copy the last record in a form/recordset to a new record in the
same form/record set.

Basically, when opening the form I immediately set the recordset to a new
record using:

DoCmd.GoToRecord acActiveDataObject, , acNewRec

If the user then enters a serial, I want to copy the last record in the
record set to this new record - as a sort of starting "deafult" value set for
the user to update if needed.
 
S

Swin

Hi all

Hi again,

I have finally got to the point where we have a functional system, albeit
with certain problems. As the DB was based on a standard MS one and I have
played with all of the Table, Field, Query and Form names, plus added some
extra tables and re-arrange relationships, some of the original functionality
has broken. Still this can be fixed a a later date.

My main concern is with some really odd VBA happenings. When I first start
the DB and the code runs by entering a value into the scan box, I get a
compile error saying that one of my "with" statements is not a proper user
defined type!!!! I have also had an issue saying that my parameter passing
are one the wrong type - but this is totaly false (as they are both defined
as long)!!! In addiiton, I sometime get a break in the code although no
breakpoint has been defined!!!

The really odd thing though is that if I simply close the debugger and run
the same action again by making change in the scan box and pressing return,
everything works as it should!!! Argghhh. I really don't understand this. I
have tried a compact and repair but no joy.

Any ideas?

Also, I'm getting really frustrated at the form sizing. No mater what I do I
can't seem set a form to a fixed size. As they get opened in different modes,
the sizes change completely. Again, really frustrating.
 
B

BruceM

Place the following line at the top of the module's code, below Option
Compare Database:
Option Explicit

Try compiling the code after doing that.

Please post the code that is causing the problems.
 
C

Chris Swinney

Hi Bruce,

This appears to be a machine specific issue. I ran the DB on another machine
and had no problem. I then compacted/repaired the DB and moved it back to
the main machine and the DB ran as it should until I made another change in
the code, then it once again stoped execution at some spurious point.

I do often use the Option Explicit statement so that I can explicitly
declare variables. I don't think my coding is to shabby, its just working
with access I'm not that clued up on.

I'm not sure what else I can do here. I might try to repair the Office
install but I don't hold out much luck. I have asked MS athe question in the
direct access groups so I see what they say.

CHris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top