Recent content by abroniewski

  1. A

    Populate Multiple Word Documents with Recordset

    I have no idea what was wrong with my code. I changed a couple thigns around, and it now works. I have also added in a line of code that creates a new directory for the templates being created. This will save a lot of needless copy/pasting/name changing Here is my code for those that are...
  2. A

    Populate Multiple Word Documents with Recordset

    Hi there! I am trying to automate the creation of multiple word documents which are based on a standard template. I create a query using the function "specificQuery" which matches a value on the form "Form New-Batch" to a field in the table "Table-EIRMaster". I then open the recordset of...
  3. A

    Extract highlighted text to New File

    Does anyone have some suggestions? I know that I will be replacing this chunk of text: Do While .Execute(findText:="[A-Z.]{2,}", _ MatchWildcards:=True, _ Wrap:=wdFindStop, Forward:=True) = True with something that finds the highlighted text. I want to use an If loop that would start if the...
  4. A

    Extract highlighted text to New File

    Hi there! I am having some trouble manipulating a word document that will be used in my access database. What I would like is a macro that will go through the entire document and copy/paste highlighted chunks of text (multi sentence) into a new document. I have a macro that I use to find all...
  5. A

    Parameter Value required after SQL update

    I'm not too sure about the usage of the line If Me.lstProgram.Selected(0) <> True Then I understand this tests to see if something is selected. I read it as "If the first item (is not equal to the second value?) Then... What does it mean/do? Also, if I were to just use the "For each...
  6. A

    Parameter Value required after SQL update

    Wow, this is actually exactly what I am looking for. Since the code is being used several times, and the only thing changing is the listbox, would it not be best to use a subroutine that passes the listbox as an argument? I tried doing this earlier, but ran into too many problems and have...
  7. A

    Parameter Value required after SQL update

    Bob, Are your suggestions based on best practice/ good style? The reason it is set up with the current IF structure is because I will have many more multiselect boxes to choose catagories from, and will be using IF statements to cycle through all those options. I will make the changes you've...
  8. A

    Parameter Value required after SQL update

    Thanks for the input! To answer your questions: 1) I am currently using the Explicit option, just didn't have that code pasted. 2) strCriteria is a string formed from the selection made in a multiselect box. I had to use the column statement as there are two columns, the first has a width of...
  9. A

    Parameter Value required after SQL update

    I am passing values from a form to the criteria of a query. The value of the string strSQL shows up perfectly everytime when viewing using the debug.Print command. When looking at the Query in Design View, the search word is surrounded by square brackets, resulting in a prompt for a parameter...
  10. A

    MultiSelect lists to form Query

    I had to call the item from position 1 (ie column 2) from the list. There is a hidden column in my listbox as the IDKey. Here is the modified loop: For Each var In Me!lstProjectPhase.ItemsSelected strCriteria = strCriteria & ",'" & lstProjectPhase.Column(1, var) & "'" Next var
  11. A

    MultiSelect lists to form Query

    Looks like the ItemData is returning the IDKey (1,2,3) associated with the catagory, rahter than the catagory itself. How can I rectify this?
  12. A

    MultiSelect lists to form Query

    I looked at some other code to try, and now I am having an error grabbing the data from the item selected... The output of the debug.Print statement is: 0 1 1 2 2 3 Private Sub cmdOK_Click() Dim db As DAO.Database Dim qdf As DAO.QueryDef Dim var As Variant Dim strCriteria As String...
  13. A

    MultiSelect lists to form Query

    I've been playing around with the code, and moved some code into the Form_Open subroutine. I get no error when I open the form, but the new error I get when clicking is "Variable not defined". Private Sub Form_Open(Cancel As Integer Dim lst As ListBox Dim db As Database Dim rst As Recordset...
  14. A

    MultiSelect lists to form Query

    Hi! I am creating a database and I have gotten stuck on the searching functionality. I am creating a form with several list boxes. The user chooses catagorie(s) to search through from these multiselect listboxes. The catagories come from a table named Classifications where each colomn is a...
Top Bottom