Search results

  1. 5

    Solved Can't find what's trimming my string to 255 characters

    Hello everyone. I wrote this function which fills MSWord templates, like the mail merge function, but customized to my needs. It basically extracts a query definition's SQL string, it concatenates the where clause and, using the first record, it finds the field names of the SQL string in the...
  2. 5

    Solved Ignore the order of words in a filter

    Hello everyone. I have a form with textbox and a subform. The textbox filters the subform through this code: Option Compare Database Option Explicit Private Sub txtSearch_Change() Dim rs As String rs = _ "SELECT mm.MunicipioID, mm.Municipio " & _ "FROM...
  3. 5

    Solved How to "hard code" the criteria of a query... from vba?

    Hello everyone, first of all, I'm experiencing a very strange situation. There's a saved query in my database, I called it "csPortada_Dictamen". Its purpose is to serve a mail merge word document. I went through the mail merge wizard to link the fields and it all works fine... if done manually...
  4. 5

    Solved Generate a random hex color string for EACH record

    Hello everyone! I created this little function to generate random hex colors: Public Function rndColorHex() As String Dim r Dim g Dim b Randomize r = Hex(Int(255 * Rnd) + 1) Randomize g = Hex(Int(255 * Rnd) + 1) Randomize b = Hex(Int(255 * Rnd) + 1) rndColorHex = "#" & r & g & b End Function...
  5. 5

    Solved How do I convert these lines into a function?

    Hello everyone. I've been requerying a bunch of ComboBoxes in my forms using the after update event of the ComboBox they depend on, it looks like this: Private Sub cboMain_AfterUpdate() Me.Combo1.Requery If Trim(Me.Combo1& "") = "" Then Me.Combo1= Me.Combo1.ItemData(0) End If...
Top Bottom