D
Dirk Goldgar
Rich1234 said:I have done a step by step edit then save then edit then save to locate
exactly which change leads Access to crash upon saving. It happens as soon
as Drivers.DriverID is removed from the subform record source.
Rich1234 said:Thanks Dirk and Kelly for your posts.
Just to confirm, I am looking for a way to see if a driver already exists as
being assigned to another vehicle, so that the user will not input the same
driver twice but instead just select the driver and the driver then will be
assigned to multiple vehicles (and will populate the driver info fields in
the sibform for this particular vehicle.)
I have tried Dirk's idea of removing Drivers.DriverID. Here are the results
Yes it does solve this problem in the short term.. but I now cannot save the
form or database without the whole of Access crashing! Unbelievable. This
has never happened consistently before and has just crashed the last 4 times
I have tried this. Some of the VB is missing when I reopen- I have not
checked everything, but the command buttons on the main form have lost all
their VB and now do nothing! when I re-open Access so I have to go back to
the backup version I saved at lunchtime - fortunate I made a backup. (I am
resisting the very strong urge to say harsh words about Microsoft!)
The combo is in the header section of the subform. I am a bit confused as
to why it does work anyway because in design view, the combo says for its
recordsource VehiclesDrivers.DriverID, "Error- No such field in the field
list." And there isn't! Yet the recordsource query for the subform includes
the VehiclesDrivers.DriverID field! Despite this, in form view it is
working! Am I missing something here, or is this very strange indeed?
Here's the recordsource for the subform:
SELECT VehiclesDrivers.VRM, VehiclesDrivers.DriverID, Drivers.Surname,
Drivers.[First Names], Drivers.DOB, Drivers.Sex,
fncDriverWarnings(VehiclesDrivers.DriverID) AS Warnings FROM Drivers INNER
JOIN VehiclesDrivers ON Drivers.DriverID=VehiclesDrivers.DriverID;
Anyway, it works short term (until I need to save, when Access crashes,
negating any benefit and creating more work.) Drivers.DriverID was in the
record source for the subform because I had been using Drivers.DriverID on an
"edit driver profile" button on each record, to open the corresponding record
in a "Drivers" form where users can edit warnings for the driver. As
Drivers.DriverID had been removed from the recordsource, I have instead been
using VehiclesDrivers.DriverID to find the correct driver, which works.
Has anyone else experienced anything similar???? Does this all stem from
the peculiar issue in the relationships window, where Vehicles is still not
showing as being in a relationship with VehiclesDrivers, even after I create
the relationship, close the window and say yes to saving the changes in the
rel. window? I still haven't got to the bottom of this issue which worries
me, Microsoft!
just for the record, the "Add Driver" button sets
Me.AllowAdditions=true then opens a new record using the standard code.. and
it works fine. All of it does til I save!
Please please help if you can! I have spent all afternoon on this.
Something is very wrong. I suspect that your database may be corrupted.
First check, though, that you don't have the Name AutoCorrect option turned
on. That can cause weird problems when Access gets confused about what the
true names of objects are.
Then try a Compact & Repair, close the database, open it, and Compact &
Repair again. If that doesn't work, you may want to try importing all
objects into a new, blank database, after making sure that Name AutoCorrect
is turned off in that database, too.