Results 1 to 5 of 5
  1. #1
    mtech is offline Novice
    Windows 7 Access 2007
    Join Date
    Nov 2010
    Posts
    3

    List box problems

    I am working on a database that is simply storing interview information. The form I am working on has some text boxes from the Referral table and from the Information table. What I am trying to do is to add 2 drop down list boxes for Type and Category. I have created two tables called CaseType and CaseCategory. Inside each of the table has ID (PK), Type or Category, and POCsN.



    I have 2 fields in the information table in which I would like the data to be stored based on the Type and Category that is selected. I have created the list boxes and bound the Control Source to Category/Type and the Row Source Type to Table/Query. The problem I am having is when I click on the list in form view, it tells me the box isn't editable and doesn't let me choose. The other problem I have is linking it back to the employee...so I went to relationships and joined the Category.ID to Information.Category and Type.ID to Information.Type. When I do this, I try to revert back to form view and my form is completely white...all the boxes go away.

    I have the 2 boxes showing up on the form with the values listed in there...but when you click on them to select what type or category, it beeps and says The recordset isn't updateable. I need to be able to select the type and category...and have the ID #'s store in the information table as 1, 2, 3, etc...in the Type and Category Fields. The type shows up in the type list box as Referral, Case, etc.... so that shows correctly now...just cannot select the one I want.

    Any suggestions? Thanks in advance.
    Last edited by mtech; 11-12-2010 at 10:40 AM. Reason: Forgot to add some more details.

  2. #2
    ConneXionLost's Avatar
    ConneXionLost is offline Simulacrum
    Windows XP Access 2003
    Join Date
    Jan 2010
    Location
    Victoria, Canada
    Posts
    291
    Hi mtech,

    Quote Originally Posted by mtech View Post
    ... The form I am working on has some text boxes from the Referral table and from the Information table. ...
    Don't force one form to put data into two tables.

    One form = One table.

    Cheers,

  3. #3
    mtech is offline Novice
    Windows 7 Access 2007
    Join Date
    Nov 2010
    Posts
    3
    The form is for entering in data. The issue is that they use this input form to look at the data as well versus printing out a report. I would like to see all the boxes on the one form for this reason. I know it can be done. I just think that something is up with the relationships and Control Source properties. I tried using the form wizard but have had no luck that route either. Any suggestions on a better way to achieve the end result?

  4. #4
    mtech is offline Novice
    Windows 7 Access 2007
    Join Date
    Nov 2010
    Posts
    3

    Any Takers

    Anyone have an idea?

    I have the boxes listing the proper names in them. I have a table called CaseType, CaseCategory, and IncidentInformation. The form I am using is called IncidentInformationSubForm. The boxes are on there and pull the alphabetical names from the table CaseCategory and CaseType. What I want to happen is once it is selected, I need the CaseCategory.ID and CaseType.ID to be stored in the IncidentInformation table in CaseType and CaseCategory fields once I hit the Save button I created at the top of the form. The save button does save all the other information I enter on the form but not the CaseType and CaseCategory. The save button is just simply doing Private Sub cmdSave_Click().....DoCmd****nCommand acCmdSave.....End Sub.


    The Control Source is CaseType.ID
    The Row Source is SELECT CaseType.* From CaseType;
    Row Source Type is Table/Query
    Bound Column 1
    Allow Edits Yes (as they did request being able to add something if some selects option 'Other'

  5. #5
    ssanfu is offline Master of Nothing
    Windows 2K Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    It is a little confusing without table names, control names, field names,.... but:

    The Control Source is CaseType.ID
    The Row Source is SELECT CaseType.* From CaseType;
    Row Source Type is Table/Query
    Bound Column 1
    Allow Edits Yes (as they did request being able to add something if some selects option 'Other'
    If this is for a combo box, then the Control Source should be linked to IncidentInformation.CaseType, NOT CaseType.ID





    The save button is just simply doing Private Sub cmdSave_Click().....DoCmd****nCommand acCmdSave.....End Sub.
    Instead, use:

    Code:
    Private Sub cmdSave_Click()
       Me.Dirty = False
    End Sub
    or

    Code:
    Private Sub cmdSave_Click()
       If Me.Dirty Then
          Me.Dirty = False
       End If
    End Sub

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

Similar Threads

  1. Input data from one list box to another list box
    By KellyR in forum Programming
    Replies: 0
    Last Post: 06-04-2010, 11:24 AM
  2. Replies: 3
    Last Post: 03-25-2010, 12:31 PM
  3. List box to populate other list boxes
    By Nathan in forum Forms
    Replies: 0
    Last Post: 03-03-2009, 07:22 PM
  4. Problems with list or combo box on tabbed form
    By kydbmaster in forum Forms
    Replies: 0
    Last Post: 02-20-2008, 01:33 AM
  5. Problems with a query in a list box
    By admaldo in forum Forms
    Replies: 1
    Last Post: 04-05-2006, 05:28 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