Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 31
  1. #16
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,972
    The DefaultValue only works when creating a new record.



    Why doesn't it work - what happens?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  2. #17
    Accessuser67 is offline Advanced Beginner
    Windows Vista Access 2010 32bit
    Join Date
    Dec 2012
    Posts
    35
    How to edit the row sources in microsoft access 2010? The property sheet box is so small to edit, is there a way to get to the row source?

    Regards.

  3. #18
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,972
    Double click the ellipses (...) which will open the query designer.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #19
    Accessuser67 is offline Advanced Beginner
    Windows Vista Access 2010 32bit
    Join Date
    Dec 2012
    Posts
    35
    I followed your link to datapigtechnologies/accessmain and saw how you used the 2 combo boxes. I followed everything as such but my second combo box is showing blank. I have 2 combo box. The first is StoreCombo and the second is CategoryCombo. I edited the row source for the CategoryCombo using the [Forms]![GroceryF]![StoreCombo] and set the second column to show category and I get a blank on the form when I go to the second combo box.

    Please help.

  5. #20
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,972
    If you followed the video precisely then should work.

    Is the RowSource SQL of the second combobox like: SELECT Category FROM tablename WHERE StoreID= [StoreCombo];

    If you want to provide db for analysis, follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #21
    Accessuser67 is offline Advanced Beginner
    Windows Vista Access 2010 32bit
    Join Date
    Dec 2012
    Posts
    35
    Quote Originally Posted by June7 View Post
    If you followed the video precisely then should work.

    Is the RowSource SQL of the second combobox like: SELECT Category FROM tablename WHERE StoreID= [StoreCombo];

    If you want to provide db for analysis, follow instructions at bottom of my post.
    It doesn't look like that. Though, I attached the database that maybe you could see where there is a discrepancy.

    Your assistance with this will be greatly appreciated.

    Best Regards.
    Attached Files Attached Files

  7. #22
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,972
    Table PK/FK setups are not right.

    Stores has PK of autonumber field but it is the store name that is saved in Grocery and CategoryAisle. Either save the autonumber PK as FK in related tables or set the store name field as PK. PK/FK fields must be the same datatype.

    Your choice will determine how the comboboxes are set up. With the store name as PK/FK (because that is how the data is currently saved), comboboxes would be:

    SELECT [Stores].[Store] FROM Stores ORDER BY [Store];

    SELECT CategoryAisle.Category, CategoryAisle.Aisle FROM CategoryAisle WHERE Store=Forms!Groceries![Store] ORDER BY CategoryAisle.Category;

    Reset other properties: ColumnCount, ColumnWidths

    ControlSource for Aisle: =[Category].[column](1)

    The only code needed in the Stores AfterUpdate is: Me.Category.Requery
    Why code in the Category AfterUpdate?


    No reason for the Aisle field in Grocery table. Will require code to save the value if you really want it saved.


    Date is a reserved word. Should not use reserved words as names.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  8. #23
    Accessuser67 is offline Advanced Beginner
    Windows Vista Access 2010 32bit
    Join Date
    Dec 2012
    Posts
    35
    I followed your recommendations but I'm still getting a blank in the combo box for the category combo box. Something in the property sheet is blocking it.

    please help.

    best regards.

  9. #24
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,972
    You changed the PK of Stores table?

    Show the properties of comboboxes or provide the db reflecting latest edits.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  10. #25
    Accessuser67 is offline Advanced Beginner
    Windows Vista Access 2010 32bit
    Join Date
    Dec 2012
    Posts
    35
    Thanks.
    I was trying some changes with the bound column and it seems to have done something.

    Best regards.

  11. #26
    Accessuser67 is offline Advanced Beginner
    Windows Vista Access 2010 32bit
    Join Date
    Dec 2012
    Posts
    35
    Now however, I have another pickle. In one of the text boxes on my form that has a number and the field data type is text for the main reason that I have a zero sometimes as data. But it is not showing up as a zero in the table.

    Any suggestions?

    Regards.

  12. #27
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,972
    Why is the datatype text? Does this field hold text or numeric data? A zero (0) should show in either.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  13. #28
    Accessuser67 is offline Advanced Beginner
    Windows Vista Access 2010 32bit
    Join Date
    Dec 2012
    Posts
    35
    Quote Originally Posted by June7 View Post
    Why is the datatype text? Does this field hold text or numeric data? A zero (0) should show in either.
    The text box in the form is plain text and the data type in the table is text. It is an unusual text box though it stores the value from a combo box selection.

    Now after I got the combo box to work it wouldn't let me select anything other than the first record in the drop down list. I don't know if this is a malfunction of microsoft access or I have to add a got focus code to before update event.

    regards.

  14. #29
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,972
    GotFocus not necessary.

    If you want to provide db for analysis, follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  15. #30
    Accessuser67 is offline Advanced Beginner
    Windows Vista Access 2010 32bit
    Join Date
    Dec 2012
    Posts
    35

    Combo Box malfunction

    Quote Originally Posted by June7 View Post
    GotFocus not necessary.

    If you want to provide db for analysis, follow instructions at bottom of my post.
    Now the combo box CategoryCombo sticks on the first record on the drop down list.

    Any suggestions would be appreciated. I think I have a glitch in the Microsoft Access 2010 program though.

    Regards.
    Attached Files Attached Files

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

Similar Threads

  1. Replies: 3
    Last Post: 12-11-2012, 09:12 AM
  2. Replies: 1
    Last Post: 10-30-2012, 10:29 AM
  3. Replies: 2
    Last Post: 08-16-2012, 10:02 PM
  4. Replies: 5
    Last Post: 03-12-2012, 02:58 AM
  5. Replies: 4
    Last Post: 08-16-2011, 05:54 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