Results 1 to 6 of 6
  1. #1
    Lukael is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Posts
    239

    Move record out and display It in another form ?

    Hi,

    I have a form that has a field for "record still valid". If field is set to NO then record is not valid anymore, and I want to remove It from displaying in form, and place It in another form, where only non-valid records would be seen.

    How can I do that ? Or any other suggestions ?




    I hope you understand what I'm saying...


    Thanks for help !!

  2. #2
    CJ_London is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    modify your form recordsource to be

    SELECT * FROM myTable WHERE validrecord=True

    substitute your real table and field names

  3. #3
    Lukael is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Posts
    239
    Thanks, It works !

    What about If I want to open only records that have specific field blank ? This doesn't work, It displays me only a new blank record:

    "SELECT * FROM MyTable WHERE TableField = NULL"

  4. #4
    CJ_London is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    try

    SELECT * FROM MyTable WHERE TableField IS NULL

    you might want to look at learning more about the SQL language - here is a link which explains most of the keywords

    http://www.w3schools.com/sql/sql_null_values.asp

  5. #5
    Lukael is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Posts
    239
    Sorry, my bad, I tried that but with no space, like: "ISNULL"

    It works indeed, thanks for all your help !!

  6. #6
    CJ_London is offline VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,397
    isnull is a function which returns true or false so you could use

    SELECT * FROM MyTable WHERE isnull(TableField)=true

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 02-06-2015, 01:18 PM
  2. Replies: 3
    Last Post: 12-11-2014, 11:26 AM
  3. Replies: 3
    Last Post: 12-03-2014, 01:40 PM
  4. Replies: 5
    Last Post: 11-06-2013, 02:49 PM
  5. Move from form to form with same record
    By soulice in forum Forms
    Replies: 14
    Last Post: 01-14-2012, 01:15 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