Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    3 Star Lounger
    Join Date
    Apr 2003
    Location
    Calgary, Alberta
    Posts
    327
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Drop Down Selection Changes (Access 2000)

    I have a drop down menu which populates a list after a selction has been made. Once I make a selection from the drop down menu is made, the value that I have selected changes to some random value in the drop down menu. The list does populate correctly which the value that I selected. Any ideas why this would happen would be great

    Thanks

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

    Re: Drop Down Selection Changes (Access 2000)

    You don't provide enough information to be able to help you.

    What is the Control Source property of the combo box?
    Do you have code in your database that sets the value of the combo box?

  3. #3
    3 Star Lounger
    Join Date
    Apr 2003
    Location
    Calgary, Alberta
    Posts
    327
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Drop Down Selection Changes (Access 2000)

    The control source is set to blank

    The row source is set to different query's depending on the select made from the radio buttons above: Each time a change is made to a radio button above, the row source is changed.

    The problem only occurs if I search by Customer, (Search by Dealership works fine)

    I have attached an image to show what the form looks like.

    Also my settingsfor the combo box start off as:

    The Row Source Type = Table/query
    The Row Source = SELECT [qry_ShowDealershipsByVHSumCustomer].[CustomerName], [qry_ShowDealershipsByVHSumCustomer].[DealershipNumber], [qry_ShowDealershipsByVHSumCustomer].[Threshold], [qry_ShowDealershipsByVHSumCustomer].[NotPrinted], [qry_ShowDealershipsByVHSumCustomer].[ID], [qry_ShowDealershipsByVHSumCustomer].[CheckSpelling], [qry_ShowDealershipsByVHSumCustomer].[LockPrinting] FROM qry_ShowDealershipsByVHSumCustomer ORDER BY qry_ShowDealershipsByVHSumCustomer.CustomerName;

    Thanks
    Attached Images Attached Images

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

    Re: Drop Down Selection Changes (Access 2000)

    What is the code behind the combo box?

  5. #5
    3 Star Lounger
    Join Date
    Apr 2003
    Location
    Calgary, Alberta
    Posts
    327
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Drop Down Selection Changes (Access 2000)

    The combo box just has
    If Me.frm_Search = 2 Then
    Me.txt_customername = Me.cmb_RVAbove.Column(0)

    End If

    Me.txt_DealerShipID = Me.cmb_RVAbove.Column(4)

    If Me.frm_Search = 1 Then
    'Lock Printing
    If Me.cmb_RVAbove.Column(6) = True Then
    Me.txt_lblprint = "This Dealership is Locked for printing!!"
    Me.txt_lblprint.FontBold = True
    Else
    Me.txt_lblprint = ""
    Me.txt_lblprint.FontBold = False
    End If

    ' Check Spelling
    If Me.cmb_RVAbove.Column(5) = True Then
    Me.txt_lblspelling = "Please Doublecheck the Spelling!!"
    Me.txt_lblspelling.FontBold = True
    Else
    Me.txt_lblspelling = ""
    Me.txt_lblspelling.FontBold = False
    End If

    End If

    Me.lst_RVUnprinted.Requery
    Me.lst_RVUnprinted.Visible = True
    Me.tab_printing.Visible = True

  6. #6
    3 Star Lounger
    Join Date
    Apr 2003
    Location
    Calgary, Alberta
    Posts
    327
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Drop Down Selection Changes (Access 2000)

    The code behind the radio buttons (in a function) is

    Basically i am just setting the row source for each choice. If there is a more efficent way of doing this as well, I am all ears
    :
    If Me.frm_Filterby = 1 And Me.frm_print = 2 And Me.frm_Filterby.Visible Then
    Me.cmb_RVAbove.RowSource = "SELECT [qry_ShowDealershipsByRVSumAbove].[DealershipName], [qry_ShowDealershipsByRVSumAbove].[DealershipNumber], [qry_ShowDealershipsByRVSumAbove].[Threshold], [qry_ShowDealershipsByRVSumAbove].[NotPrinted], [qry_ShowDealershipsByRVSumAbove].[ID], [qry_ShowDealershipsByRVSumAbove].[CheckSpelling], [qry_ShowDealershipsByRVSumAbove].[LockPrinting] FROM qry_ShowDealershipsByRVSumAbove; "
    Me.lst_RVUnprinted.RowSource = "SELECT Format([RVAllDetailsByID].[DateOfSale],'Medium Date') AS DateOfSale, [RVAllDetailsByID].[SalesRep], [RVAllDetailsByID].[Customer_Name], Format([RVAllDetailsByID].[DateAdded],'Medium Date') AS DateAdded, [RVAllDetailsByID].[IsPrinted], [RVAllDetailsByID].[DealershipID], [RVAllDetailsByID].[PhotoNumber], [RVAllDetailsByID].[Notes] FROM RVAllDetailsByID WHERE IsPrinted=False ORDER BY [RVAllDetailsByID].[DateAdded]; "
    OpenWhich = "RV"
    Me.lbl_cmbText = "Dealerships"

    ElseIf Me.frm_Filterby = 2 And Me.frm_print = 2 And Me.frm_Filterby.Visible Then
    Me.cmb_RVAbove.RowSource = "SELECT [qry_ShowDealershipsByRVSumBelow].[DealershipName], [qry_ShowDealershipsByRVSumBelow].[DealershipNumber], [qry_ShowDealershipsByRVSumBelow].[Threshold], [qry_ShowDealershipsByRVSumBelow].[NotPrinted], [qry_ShowDealershipsByRVSumBelow].[ID], [qry_ShowDealershipsByRVSumBelow].[CheckSpelling], [qry_ShowDealershipsByRVSumBelow].[LockPrinting] FROM qry_ShowDealershipsByRVSumBelow; "
    Me.lst_RVUnprinted.RowSource = "SELECT Format([RVAllDetailsByID].[DateOfSale],'Medium Date') AS DateOfSale, [RVAllDetailsByID].[SalesRep], [RVAllDetailsByID].[Customer_Name], Format([RVAllDetailsByID].[DateAdded],'Medium Date') AS DateAdded, [RVAllDetailsByID].[IsPrinted], [RVAllDetailsByID].[DealershipID], [RVAllDetailsByID].[PhotoNumber], [RVAllDetailsByID].[Notes] FROM RVAllDetailsByID WHERE IsPrinted=False ORDER BY [RVAllDetailsByID].[DateAdded]; "
    OpenWhich = "RV"
    Me.lbl_cmbText = "Dealerships"


    ElseIf Me.frm_print = 2 And Me.frm_Search = 2 Then
    Me.cmb_RVAbove.RowSource = "SELECT [qry_ShowDealershipsByRVSumCustomer].[CustomerName], [qry_ShowDealershipsByRVSumCustomer].[DealershipNumber], [qry_ShowDealershipsByRVSumCustomer].[Threshold], [qry_ShowDealershipsByRVSumCustomer].[NotPrinted], [qry_ShowDealershipsByRVSumCustomer].[ID], [qry_ShowDealershipsByRVSumCustomer].[CheckSpelling], [qry_ShowDealershipsByRVSumCustomer].[LockPrinting] FROM qry_ShowDealershipsByRVSumCustomer ORDER BY qry_ShowDealershipsByRVSumCustomer.CustomerName ASC; "
    Me.lst_RVUnprinted.RowSource = "SELECT Format([RVAllDetailsByIDForCustomer].[DateOfSale],'Medium Date') AS DateOfSale, [RVAllDetailsByIDForCustomer].[SalesRep], [RVAllDetailsByIDForCustomer].[Customer_Name], Format([RVAllDetailsByIDForCustomer].[DateAdded],'Medium Date') AS DateAdded, [RVAllDetailsByIDForCustomer].[IsPrinted], [RVAllDetailsByIDForCustomer].[DealershipID], [RVAllDetailsByIDForCustomer].[PhotoNumber], [RVAllDetailsByIDForCustomer].[Notes] FROM RVAllDetailsByIDForCustomer WHERE IsPrinted=False ORDER BY [RVAllDetailsByIDForCustomer].[Customer_Name] DESC; "
    OpenWhich = "RV"
    Me.lbl_cmbText = "Customers"

    'Vehicle and Dealership Options
    ElseIf Me.frm_Filterby = 1 And Me.frm_print = 1 And Me.frm_Filterby.Visible Then
    Me.cmb_RVAbove.RowSource = "SELECT [qry_ShowDealershipsByVHSumAbove].[DealershipName], [qry_ShowDealershipsByVHSumAbove].[DealershipNumber], [qry_ShowDealershipsByVHSumAbove].[Threshold], [qry_ShowDealershipsByVHSumAbove].[NotPrinted], [qry_ShowDealershipsByVHSumAbove].[ID], [qry_ShowDealershipsByVHSumAbove].[CheckSpelling], [qry_ShowDealershipsByVHSumAbove].[LockPrinting] FROM qry_ShowDealershipsByVHSumAbove; "
    Me.lst_RVUnprinted.RowSource = "SELECT Format([VHAllDetailsByID].[DateOfSale],'Medium Date') AS DateOfSale, [VHAllDetailsByID].[SalesRep], [VHAllDetailsByID].[Customer_Name], Format([VHAllDetailsByID].[DateAdded],'Medium Date') AS DateAdded, [VHAllDetailsByID].[IsPrinted], [VHAllDetailsByID].[DealershipID], [VHAllDetailsByID].[PhotoNumber], [VHAllDetailsByID].[Notes] FROM VHAllDetailsByID WHERE IsPrinted=False ORDER BY [VHAllDetailsByID].[DateAdded]; "
    OpenWhich = "VH"
    Me.lbl_cmbText = "Dealerships"

    ElseIf Me.frm_Filterby = 2 And Me.frm_print = 1 And Me.frm_Filterby.Visible Then
    Me.cmb_RVAbove.RowSource = "SELECT [qry_ShowDealershipsByVHSumBelow].[DealershipName], [qry_ShowDealershipsByVHSumBelow].[DealershipNumber], [qry_ShowDealershipsByVHSumBelow].[Threshold], [qry_ShowDealershipsByVHSumBelow].[NotPrinted], [qry_ShowDealershipsByVHSumBelow].[ID], [qry_ShowDealershipsByVHSumBelow].[CheckSpelling], [qry_ShowDealershipsByVHSumBelow].[LockPrinting] FROM qry_ShowDealershipsByVHSumBelow; "
    Me.lst_RVUnprinted.RowSource = "SELECT Format([VHAllDetailsByID].[DateOfSale],'Medium Date') AS DateOfSale, [VHAllDetailsByID].[SalesRep], [VHAllDetailsByID].[Customer_Name], Format([VHAllDetailsByID].[DateAdded],'Medium Date') AS DateAdded, [VHAllDetailsByID].[IsPrinted], [VHAllDetailsByID].[DealershipID], [VHAllDetailsByID].[PhotoNumber], [VHAllDetailsByID].[Notes] FROM VHAllDetailsByID WHERE IsPrinted=False ORDER BY [VHAllDetailsByID].[DateAdded]; "
    OpenWhich = "VH"
    Me.lbl_cmbText = "Dealerships"

    ' Search by Vehicle and by Customer
    ElseIf Me.frm_print = 1 And Me.frm_Search = 2 Then
    Me.cmb_RVAbove.RowSource = "SELECT [qry_ShowDealershipsByVHSumCustomer].[CustomerName], [qry_ShowDealershipsByVHSumCustomer].[DealershipNumber], [qry_ShowDealershipsByVHSumCustomer].[Threshold], [qry_ShowDealershipsByVHSumCustomer].[NotPrinted], [qry_ShowDealershipsByVHSumCustomer].[ID], [qry_ShowDealershipsByVHSumCustomer].[CheckSpelling], [qry_ShowDealershipsByVHSumCustomer].[LockPrinting] FROM qry_ShowDealershipsByVHSumCustomer ORDER BY qry_ShowDealershipsByVHSumCustomer.CustomerName; "
    Me.lst_RVUnprinted.RowSource = "SELECT Format([VHAllDetailsByIDForCustomer].[DateOfSale],'Medium Date') AS DateOfSale, [VHAllDetailsByIDForCustomer].[SalesRep], [VHAllDetailsByIDForCustomer].[Customer_Name], Format([VHAllDetailsByIDForCustomer].[DateAdded],'Medium Date') AS DateAdded, [VHAllDetailsByIDForCustomer].[IsPrinted], [VHAllDetailsByIDForCustomer].[DealershipID], [VHAllDetailsByIDForCustomer].[PhotoNumber], [VHAllDetailsByIDForCustomer].[Notes] FROM VHAllDetailsByIDForCustomer WHERE IsPrinted=False ORDER BY [VHAllDetailsByIDForCustomer].[Customer_Name] DESC ; "
    OpenWhich = "VH"
    Me.lbl_cmbText = "Customers"



    End If
    Me.txt_lblprint = ""
    Me.txt_lblspelling = ""
    Me.cmb_RVAbove = ""
    Me.cmb_RVAbove.Requery
    Me.tab_printing.Visible = False
    Me.lst_RVUnprinted.Visible = False

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

    Re: Drop Down Selection Changes (Access 2000)

    I see nothing here that sets the value of the combo box.

  8. #8
    3 Star Lounger
    Join Date
    Apr 2003
    Location
    Calgary, Alberta
    Posts
    327
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Drop Down Selection Changes (Access 2000)

    The combo box's Row Type is set by the selection made by the radio buttons above. That is the only thing that changes within the combo box

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

    Re: Drop Down Selection Changes (Access 2000)

    If you like, you can post a stripped down version of the database:
    <UL><LI>Make a copy of the database and work with that.
    <LI>Remove all database objects (tables, queries, forms, reports, macros and modules) that are not relevant to the problem.
    <LI>In the remaining table(s), remove most records - leave only the minimum number necessary to demonstrate the problem.
    <LI>Remove or modify data of a confidential nature.
    <LI>Do a compact and repair (Tools/Database Utilities).
    <LI>Make a zip file containing the database; it should be below 100KB.
    <LI>Attach the zip file to a reply.[/list]I don't think there is a way we can help you without seeing the database.

  10. #10
    3 Star Lounger
    Join Date
    Apr 2003
    Location
    Calgary, Alberta
    Posts
    327
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Drop Down Selection Changes (Access 2000)

    OK, I will try to get it down to that size

    On a side note, how can you bring up the print dialog box?

    Thank a bunch

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

    Re: Drop Down Selection Changes (Access 2000)

    >> how can you bring up the print dialog box?

    RunCommand acCmdPrint

    Note: if the user cancels the dialog box, error 2501 (action canceled by user) will occur, so you must trap this error:

    Private Sub cmdPrintDialog_Click()
    On Error GoTo ErrHandler

    RunCommand acCmdPrint
    Exit Sub

    ErrHandler:
    If Err = 2501 Then
    ' Canceled - ignore
    Else
    MsgBox Err.Description, vbExclamation
    End If
    End Sub

  12. #12
    3 Star Lounger
    Join Date
    Apr 2003
    Location
    Calgary, Alberta
    Posts
    327
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Drop Down Selection Changes (Access 2000)

    Cool that works great, but actually instead of giving the print dialog box, can I give them like a print setup/page setup box? At the point that they select the printer and its settings, thier is nothing to currently print.

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

    Re: Drop Down Selection Changes (Access 2000)

    It would be nice if you thought about what you want before asking something. And there is no absolute rule against trying to find out something yourself, you know...

    RunCommand acCmdPageSetup

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

    Re: Drop Down Selection Changes (Access 2000)

    You already asked this question in <post#=306853>post 306853</post#>. I would suggest you not ask the same questions in multiple threads. <!rule=3>Rule 3<!/rule> is Stay on Topic.
    Charlotte

  15. #15
    3 Star Lounger
    Join Date
    Apr 2003
    Location
    Calgary, Alberta
    Posts
    327
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Drop Down Selection Changes (Access 2000)

    Right right, sorry

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
  •