Page 2 of 2 FirstFirst 12
Results 16 to 20 of 20
  1. #16
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    PMFBI. I've skim read this thread and I know you are being very capably supported by Micron.



    Boolean fields in Access are either true or false. If left unfilled, they are false not null.
    In contrast, Boolean fields in SQL Server can also have a null value.

    Checkboxes in Access bound to Boolean fields can therefore never be null.
    Unbound checkboxes can be null. If so, the checkbox will appear filled in.

    HTH. If it's off topic, just ignore it!
    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!

  2. #17
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    Thanks Colin. I ignored those comments as they didn't seem significant at the time & I probably wasn't sure at that point if the checkboxes were to be used as criteria or as some sort of switch to say use or don't use a mating textbox or something. Thanks for the info - always appreciate your input.

    So here's my take at it. Given the time pressure, it's not as elegant as it probably could be but it works. There is one very odd behaviour which I've never seen before. It seems that if the query to open the report fails (and I don't mean that it just doesn't return records), the report opens in design view. I've never seen that before, but then again, I don't believe I've ever used a report with no record source yet each control has a control source. This would be one of those inelegant things I'm referring to. I think a better approach might be to have a query, modify the query def and then open the report based on the query. Maybe later if I'm really bored

    Here's the file with a table of notes added. There are as many notes within the code as I could think of as well. The form space was compressed because it didn't fit my laptop monitor and I hate scrolling when I don't have to. OP can move everything back np.

    RouterDBMicron.zip

    This attachment replaces a prior one uploaded on the same date.
    Last edited by Micron; 11-22-2018 at 05:54 PM.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #18
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    Hi Micron
    My comments were aimed at the OP rather than yourself
    As I said I had only skim read the thread & haven't downloaded the original file.
    Just had a look at yours and can see it works but without reading everything through in detail, I'm unclear why the report has no record source but each control is then bound?

    I do have a number of reports with no record source in the property sheet.
    I do that when the same report can be used for a variety of different purposes with different SQL.
    In such cases the record source is set either on the calling form or in the report open event using open args.
    Is that similar to what's being done here?

    BTW I know it was a typo but I'm still unable to work out what a 'mating textbox' might be
    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!

  4. #19
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    my comments inserted
    Quote Originally Posted by ridders52 View Post
    Hi Micron
    My comments were aimed at the OP rather than yourself - I knew that; just saying I elected to overlook the related comments
    As I said I had only skim read the thread & haven't downloaded the original file.
    Just had a look at yours and can see it works but without reading everything through in detail, I'm unclear why the report has no record source but each control is then bound?
    I removed the recordsource to see if it had any effect on the report opening in design view when it shouldn't. I left it like that; probably an oversight but it works.
    I do have a number of reports with no record source in the property sheet.
    I do that when the same report can be used for a variety of different purposes with different SQL.
    In such cases the record source is set either on the calling form or in the report open event using open args.
    Is that similar to what's being done here? Source is being assigned upon opening. One reason why I said a query def might be a better approach.

    BTW I know it was a typo but I'm still unable to work out what a 'mating textbox' might be
    No typo. Originally thought along the lines of "chkCustomer" being True was a flag in that complicated IIF stuff to say "include what's in txtCustomer" thus the "mate" to the checkbox. Is your mind being naughty today?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #20
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    Check...mate
    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!

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

Similar Threads

  1. Replies: 10
    Last Post: 03-11-2016, 04:16 PM
  2. Replies: 7
    Last Post: 09-21-2012, 03:30 PM
  3. Replies: 7
    Last Post: 10-25-2011, 08:32 PM
  4. Replies: 2
    Last Post: 01-03-2011, 05:17 PM
  5. !!!!Urgent!!!! Search code doesn't work!
    By Laetilae in forum Programming
    Replies: 4
    Last Post: 12-13-2010, 10:34 PM

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