Search results

  1. R

    Color values from table

    Hi, I tried this and nothing happens Public Function controlColour(ByRef theControl As Variant, ByVal theColorTag As String) Dim theColor As Long theColor = Nz(DLookup("AAR Mech Code", "Stock List Query", "'BKColor' = '" & theColorTag & vbNullString & "'"), -1) If theColor <> -1 Then...
  2. R

    Color values from table

    nanscombe, Public Function controlColour(ByRef theControl as Variant, Byval theColorTag as String) Dim theColor as long theColor = Nz(DLookup("colorInfoField", "tblColorInfoTable", "colorTagField = '" & theColorTag & vbNullString & "'"), -1) If theColor <> -1 then theControl.BackColor =...
  3. R

    Color values from table

    Hi, My reason for the various colors is that on a report (where the VBA code is) I want each type to have its own background color of its box. The report is generated from a query. I have a Query where I have several fields but the only important ones are ID, AAR_Mech_Code, Color, and...
  4. R

    read value from field

    Hi, You have to make a Query that has the table with the three fields and the table with the lookup field. To do this you Create a form in Design view, then open both tables. Then drag the fields you want from both tables down to the bottom. If you add the lookup field to the bottom its value...
  5. R

    Color values from table

    Hi, I am trying to enter a color value in a table and use it in a VBA code that changes. I have the following code that works but, I have to put each value of one field in there and assign it a color in the code. I would like the code to look up the value of one field and use the corresponding...
Back
Top Bottom