Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Yes/No default (2003)

    I have numerous Yes/No controls on a form, which I though I had set to blank on opening. When I click on one of them to change it, all the blank ones default to No. Why?

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Yes/No default (2003)

    You probably have a default value of 0 in those fields in the underlying table. When you click into one of the checkboxes, assuming it's bound, you start a new record and the defaults apply.
    Charlotte

  3. #3
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Yes/No default (2003)

    It sounds like you have put all the yes/no fields into an option group. How did you add them to the form?

    An option group works like a collection of radio buttons - if one is true the others have to be false.

    Are the controls bound to fields in a table?
    Regards
    John



  4. #4
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Yes/No default (2003)

    No they're not in an option group. They are all bound to seperate fields in a table.

  5. #5
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Yes/No default (2003)

    All the default values in the fields of the table are empty, as I want them to appear

  6. #6
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Yes/No default (2003)

    Perhaps if I creat a choice of " ",Yes,No - that might work.

  7. #7
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Yes/No default (2003)

    I think it would be useful if you could post a cut down version of the your database.

    Just the table with a few records and the form is all that is needed.
    Regards
    John



  8. #8
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Yes/No default (2003)

    Here's the database. There are no records in it at the moment, but you will see the problem when you open Form1. When you click on any of the Yes/No fields, they all fill in. I want them to be empty until a choice is made.

  9. #9
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Yes/No default (2003)

    Can you tell us which Yes/No fields you mean - on which tab do they reside, and what are their names?

  10. #10
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Yes/No default (2003)

    Any tab, any field.

  11. #11
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Yes/No default (2003)

    A Yes/No field in an existing record in a table is either Yes or No, never blank.
    When you go to a new record in the form, the record is still blank, and since you haven't specified a default value for the Yes/No fields, the combo boxes are blank.
    As soon as you start entering data in the new record, for example by selecting Yes or No in one of the combo boxes, the record is not blank any more, and hence the combo boxes show No. They *can't* be blank any more since that is not valid for Yes/No fields.

  12. #12
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Yes/No default (2003)

    A way around this is to change your yes/no fields into number fields where (say) 1 means "yes", 2 means "No" and 3 means not "entered yet" and perhaps 4 means "missing data". In this the default value ccould be set to 3 for each field. Create a lookup table with these values and get the combo boxes to draw their values from this table.

    Whenever you query the database later you need to remember what the numbers mean, or use the lookup table again.
    Regards
    John



  13. #13
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Yes/No default (2003)

    Thanks Hans, John. I'll look into changing it. Thanks. On the same database I have to create a report that looks like the form. Will Access allow me to pull all the fields from the query into one report, and automatically split the pages?

  14. #14
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Yes/No default (2003)

    > Will Access allow me to pull all the fields from the query into one report, and automatically split the pages?

    I'm not sure what you mean. You could copy the controls from each page of the tab control to the report. You'll have to do this for each tab page separately.

  15. #15
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Yes/No default (2003)

    That's what I meant, I just wanted to clarify that Access will allow me to have one 'long' report which will split into pages when printed.

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •