Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19
  1. #16
    DMT Dave is online now VIP
    Windows 10 Access 2016
    Join Date
    May 2018
    Posts
    1,365
    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 comment regards dave

  2. #17
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    You're welcome and thanks for the comments
    I hope you meant "I need NOT worry about database size"
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  3. #18
    Micron is online now Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    I use recordsets quite frequently,
    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:
    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.

  4. #19
    Join Date
    Apr 2017
    Posts
    1,792
    Quote Originally Posted by ridders52 View Post
    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
    Btw, very good point here!
    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"

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. query to get data from 2 criterias
    By megatronixs in forum Queries
    Replies: 2
    Last Post: 05-06-2016, 12:00 AM
  2. How to search for multiple criterias using comboBox?
    By AccessPractice in forum Programming
    Replies: 2
    Last Post: 04-29-2016, 03:59 AM
  3. Replies: 3
    Last Post: 05-07-2015, 10:24 AM
  4. Query based on two different criterias
    By BRZ-Ryan in forum Queries
    Replies: 11
    Last Post: 12-22-2013, 09:25 PM
  5. search a value with 2 criterias
    By Patougaffou in forum Queries
    Replies: 5
    Last Post: 07-26-2011, 10:50 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums