Search results

  1. 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...
  2. 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 =...
  3. 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?
  4. 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...
  5. 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...
  6. 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"...
  7. S

    Running multiple SQL commands

    I want to run multiple SQL commands on click of a button. I have these three command, CurrentDb.Execute "INSERT INTO UserMadeDeviceT(Product, ORESector) " & _ " VALUES ('" & Me.D_NewDeviceTxt & "', '" & Me.D_ORECmb & "')" CurrentDb.Execute "INSERT INTO...
  8. S

    Hello

    I'm pretty new to Access so any help would be great
  9. S

    How do I get rid of a too few parameters error?

    As it stands this is what I am trying to do. I'm trying to read a value from a combo box in a form and then choose the price corresponding to this value from a table so I can then do a calculation based on this price. This is my code, Dim materialCost As Double Dim strSQL As String Dim rst As...
Top Bottom