Results 1 to 11 of 11
  1. #1
    benjammin is offline Advanced Beginner
    Windows XP Access 2003
    Join Date
    Nov 2010
    Posts
    60

    cascading combo box problem


    Hi, so I haven't quite figured out this cascading combo box thing based off a query. I can have the first combo propogate to give choices for the second combo but when I go to save the info into the form table nothing shows up?

    I have uploaded the file,

    http://www.puckscases.com/soars_inventory.accdb

    the problem is on frmAddEquipment

    What am I missing?

    Thanks!

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,742

  3. #3
    benjammin is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Nov 2010
    Posts
    60
    I watched those and I understand that but i'm pulling from two different (but related) tables and trying to use those values to write in a third table. It's not so much the cascading part but the part where it actually writes data to the table my form is associated with.

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,742
    I have acc 2003 and can not open accdb.

    You profile says 2003, yet you have posted an accdb. How'd you do that?
    Can you send an mdb version and I'll look at it.

    Ahh: I see your profile has changed between posts??

  5. #5
    benjammin is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Nov 2010
    Posts
    60
    Well I switched to an AfterUpdate SQL statement which is now showing the correct values in the second combo box but I'm still unable to write to the form's table. It sends me a

    "You cannot add or change a record because a related record is required in table 'tblStation'."

    Not quite sure why there has to be a related record... tblEquipment (with field StationID) and tblStation (with field StationID) are related but not mutually exclusive. I have one station to many StationIDs in the tblEquipment.

    here's my SQL statement and attached relationship view:

    Me.cboStationName.RowSource = "SELECT StationName, SiteID, StationID FROM tblStation " & _
    "WHERE tblStation.SiteID = '" & cboSiteName.Value & "' " & _
    "ORDER BY tblStation.StationName"

    Thanks again!

  6. #6
    benjammin is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Nov 2010
    Posts
    60
    I'm pretty sure I updated my profile before I submitted the thread

  7. #7
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,963
    Is 'Enforce referential integrity' checked in the Jointype properties of the table link?
    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. #8
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,742
    I read a post on this subject earlier today, but don't recall the specifics. It had to do with a foreign key. In that case I think the person did not use the Join parameters from the relationships, but created his own.

    I think the result (but just a guess) was you have to reset /rebuild the join on the tables involved. I just forget where it was, but I'll take a look.

  9. #9
    benjammin is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Nov 2010
    Posts
    60

    Talking

    Quote Originally Posted by June7 View Post
    Is 'Enforce referential integrity' checked in the Jointype properties of the table link?

    DOH, yes and when i removed it guess what happens?

    THANKS! SOLVED!

  10. #10
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,742
    Quote Originally Posted by benjammin View Post
    DOH, yes and when i removed it guess what happens?

    THANKS! SOLVED!
    Great.

    Here is the post I mentioned earlier (foreign key etc)

    http://www.utteraccess.com/forum/Mig...-t1967271.html

  11. #11
    benjammin is offline Advanced Beginner
    Windows XP Access 2010 32bit
    Join Date
    Nov 2010
    Posts
    60
    interesting, thanks

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

Similar Threads

  1. Cascading Combo Box Help
    By euphoricdrop in forum Forms
    Replies: 3
    Last Post: 04-12-2011, 05:35 PM
  2. Cascading Combo boxes Problem
    By aamer in forum Access
    Replies: 12
    Last Post: 04-03-2011, 07:11 AM
  3. Cascading Combo Box Problem
    By skiptotheend in forum Forms
    Replies: 2
    Last Post: 10-26-2009, 05:31 AM
  4. Problem with Cascading Combo Boxes
    By CushingMT in forum Forms
    Replies: 0
    Last Post: 11-13-2008, 09:44 AM
  5. Cascading Combo Box
    By nywi6100 in forum Forms
    Replies: 0
    Last Post: 10-23-2006, 01:45 PM

Tags for this Thread

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