Results 1 to 5 of 5
  1. #1
    marklove is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Apr 2013
    Posts
    12

    enter parameter value problem..

    good day

    I have a problem regarding my project. I am using access 2007 to create a survey with 3 cascade comboboxes. Everytime i select a value in the first ComboBox a Enter Parameter appears, but it is working if i click the OK button.

    here are my tables:

    tblProvince
    provinceID=Pk
    ProvinceName

    tblMunicipality
    MunicipalityID=Pk


    MunicipalityName
    ProvinceID

    tblBarangay
    BarangayID=pk
    BarangayName
    MunicipalityID

    CAN SOMEONE HELP ME?
    any help is well appreciated
    Attached Files Attached Files

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,952
    Change the Municipality RowSource to:

    SELECT MunicipalityID, MunicipalityName FROM tblMunicipality WHERE ProvinceID=[cboProvince];

    The only code you need is:

    Private Sub cboProvince_AfterUpdate()
    Me.cboMunicipality.Requery
    Me.cboMunicipality = Me.cboMunicipality.ItemData(0)
    End Sub
    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.

  3. #3
    marklove is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Apr 2013
    Posts
    12

    Thumbs up

    Quote Originally Posted by June7 View Post
    Change the Municipality RowSource to:

    SELECT MunicipalityID, MunicipalityName FROM tblMunicipality WHERE ProvinceID=[cboProvince];

    The only code you need is:

    Private Sub cboProvince_AfterUpdate()
    Me.cboMunicipality.Requery
    Me.cboMunicipality = Me.cboMunicipality.ItemData(0)
    End Sub








    Your codes made my day sir! thankyou so much! it works!....

  4. #4
    marklove is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Apr 2013
    Posts
    12
    it work but right now i can't save my record
    i just want to save my record in a different table so how will i do that if my combobox is unbound?

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,952
    If you want record saved to Database table then bind comboboxes to fields of that table. That form's RecordSource could be only the Database table. Or change the SQL to:

    SELECT Database.ID, Database.[UP-ID], Database.Province, Database.Municipality, Database.Barangay, tblMunicipality.MunicipalityName, tblBarangay.BarangayName, tblProvince.ProvinceName
    FROM tblProvince RIGHT JOIN (tblBarangay RIGHT JOIN (tblMunicipality RIGHT JOIN [Database] ON tblMunicipality.MunicipalityID = Database.Municipality) ON tblBarangay.BarangayID = Database.Barangay) ON tblProvince.ProvinceID = Database.Province;
    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.

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

Similar Threads

  1. Replies: 13
    Last Post: 01-10-2012, 09:56 AM
  2. Forms Subforms Enter Parameter Problem
    By GenericHbomb in forum Forms
    Replies: 3
    Last Post: 08-02-2011, 10:17 AM
  3. Enter Parameter Value Problem
    By batowl in forum Queries
    Replies: 4
    Last Post: 12-22-2010, 01:37 PM
  4. Enter Parameter Value
    By T001 in forum Access
    Replies: 1
    Last Post: 08-11-2010, 05:43 AM
  5. Enter Parameter Value
    By plesser in forum Access
    Replies: 1
    Last Post: 11-08-2008, 10:27 AM

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