all of your points accepted, I need worry about database size, I am hoping to try your backup method as soon as get chance, once again your help is greatly appreciated and I have left you a commentregards dave
all of your points accepted, I need worry about database size, I am hoping to try your backup method as soon as get chance, once again your help is greatly appreciated and I have left you a commentregards dave
Then I suggest you always validate that there are records, otherwise a Move with no records will cause an error. I adopted Allan Browne's approach:I use recordsets quite frequently,
If Not (rs.BOF And rs.EOF) Then... If there are no records, both are true. This is supposed to be better than getting the recordset count as a means of validation. This is more important than the following:
you can declutter the sql syntax a wee bit
("Select * From tblEdit WHERE Status = '" & MySt1 & "'" & " Or Status = '" & Myst2 & "'")
to
("Select * From tblEdit WHERE Status = '" & MySt1 & "' OR Status = '" & Myst2 & "'")
Colin: nice procedure. I guess it's slicker than just calling a command line (batch) file, which is all I ever did. Worked fine though.
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.
Btw, very good point here!4. Having said all that, why do you need to move the records at all? Why not keep them in the same table and use the status field (or similar) to mark them as e.g. archived
One of my biggest mistakes was creating separate tables for student leavers and yet more tables for archived records. The amount of additional work this caused over the years was enormous and I strongly advise against doing anything like that
I have an IT Devices database, where in devices table is calculated field CurrenUserLevel with value range 1 - 99. Whenever the device is attached to new user, according value is written into CurrentUserLevel. The value depends on firm the user belongs to. For some firms, several consecutive user levels for different user types may exist. User levels for firms in same country are grouped together. There are some fictitious users like "archived device", "broken Device", "Free Device", etc. which have separate user levels between 90 - 99.
The App has main unbound form with multipage tab control. One page contains a Device Registry form. On top of page is a combo, where user can select various filters for Device Registry form.
When user selects "Show archived devices", the filter "CurrentUserLevel = 99" is set.
When user selects "Show all devices in use", the filter "CurrentUserLevel < 99" is set.
When user selects "Show free devices", the filter "CurrentUserLevel = 90" is set
When user selects "Show SomeCountry devices", the filter like CurrentUserLevel >=40 AND CurrentUserLevel < 50 is set.
Etc.
The default filter assigned on Open is "CurrentUserLevel < 99"