Search results

  1. S

    Display and ole object in a message box

    Thanks. I was afraid of that.
  2. S

    Display and ole object in a message box

    I'm trying to display an image which is saved in the table as an OLE Object in a message box. The field with the object is "PowerCurve". This is what I'm trying to do. It allows me to get as far as clicking yes to view the second message box but then it results in an error when it tries to...
  3. S

    Display text depending on combo box in a different form

    I know it must be the If statement that's the problem because if I remove it and just use the code Forms!CustomComponentF!C_ComponentTxt.Value = Me.D_ComponentTypeCmb it works fine.
  4. S

    Display text depending on combo box in a different form

    This returns the text in D_ComponentTypeCmb in a message box. If appears that the problem is with the line If Me.D_ComponentNameCmb.Value = "Customise" Then although I can't figure out why this would be.
  5. S

    Display text depending on combo box in a different form

    I'm not sure I understand Bob's code. It doesn't allow you to run it as it's not the correct format for an if statement. What do you mean by stepping through it?
  6. S

    Display text depending on combo box in a different form

    The message box displayed the text from D_ComponentNameCmb
  7. S

    Display text depending on combo box in a different form

    I want to display the text from one combo in a text box in another form based on what's selected in a second combo box. The text box is in a different form from the combo boxes. Any idea what's wrong with this code? Sub D_ComponentTypeCmb_Change() If Me.D_ComponentNameCmb.Value =...
  8. S

    Missing Syntax

    Yeah, it seems a bit obvious now
  9. S

    Missing Syntax

    I got it in the end. This is the code that worked. Dim str As String str = DLookup("Manufacturer", "ComponentT", "TotalComponent = '" & Forms![ProjectF]!P_AnchorCmb & "'")
  10. S

    Missing Syntax

    This DLookup give me a missing syntax error. Dim strName As String strName = DLookup("Manufacturer", "ComponentT", "TotalComponent = " & Forms!ProjectF.P_AnchorCmb) Any idea why?
  11. S

    Dynamic select case

    It's tricky. At the moment I'm using a lot of if statements. Each of the three combo boxes is dependent on what's selected in the other two. It follows the pattern if "All" is selected it will display everything, if a particular value is selected the next combo box displays the corresponding...
  12. S

    Dynamic select case

    Thanks for the help. I've been using cascading combo boxes elsewhere in the code but I'm having difficulty here because I want the user to be able to select the combo boxes in any order they choose. Any ideas?
  13. S

    Dynamic select case

    I want to know if it's possible to make a dynamic select case. In my form I have 3 separate combo boxes. What I want to happen is depending on what was selected in one the options in the other two change and if you select something in the second the option in the third narrows down again. The...
  14. S

    How to select an item from a listbox?

    As it stands now I have a combo box which displays a unique value from a table. Based on which entry the user selects in this combo box a text box will display a different field of information from the table corresponding to the row which the unique value in the text box came from. I also have a...
  15. S

    How to select an item from a listbox?

    At the moment I have a query that returns a result based on what's selected in a combobox. SELECT ComponentT.ComponentType AS ComponentType FROM ComponentT WHERE (((ComponentT.TotalComponent) Like [Forms]![DeviceF]![D_ComponentNameCmb] & "*")); Instead of this I want to rewrite the query to...
  16. S

    Mixing variable types

    Sorry the question was a bit vague bit changing + to & worked. Thank you
  17. S

    Mixing variable types

    I was wondering if anyone can tell me why this doesn't work? Dim MooringLines As String Dim MooringLinesPrice As Double MooringLines = DLookup("TotalComponent", "ComponentT", "[TotalComponent] = '" & Me.P_MooringLinesCmb & "'") MooringLinesPrice = DLookup("EuroPerMetre"...
  18. S

    Running multiple SQL commands

    This is the code I used that seemed to work. Dim dblPower As Double dblPower = DLookup("RatedPower", "DeviceRatedPowerQ") Dim dblWeight As Double dblWeight = DSum("[Weight]", "UserSelectedComponentT") Dim dblCost As Currency dblCost = DSum("[EuroCost]"...
  19. S

    Running multiple SQL commands

    Actually I see my mistake. It's just a syntax problem. Thank you
Back
Top Bottom