Search results

  1. C

    Mail merge query results

    Okay give this the once over Most of your code stays the same I have removed the line Set qdf = db.QueryDefs("Test") And I have added the On error line at the top. Private Sub cmdOK_Click() On Error GoTo Err_BuildQuery Dim db As DAO.Database Dim qdf As DAO.QueryDef Dim...
  2. C

    help: how to get value of number of row in listbox value

    Me.List1.ListCount
  3. C

    Mail merge query results

    no no no no no oh yes... sort of Show me the code you have now for running the base query.
  4. C

    Mail merge query results

    My fault. I have given you code that contains 2 function which both have the same name and it is confusing things somewhat. Replace the code in the module with this: Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long...
  5. C

    Need help with table normalization

    You tell me. In your spec you mention a 'Project Leader' Does this equate to saying 'Person in charge of module'? I'll assume that it does. Board(BoardNumber, BoardName) Module(ModuleNumber, ModuleName, ModuleLeader, Source, Assembler, Directory) ModuleParts(Module, Board) Engineer(EngineerID...
  6. C

    Merge tables

    SELECT Table1.Key, Table1.Common, Table1.Spec1, Table2.Spec2 FROM Table1 INNER JOIN Table2 ON Table1.Key = Table2.Key
  7. C

    Mail merge query results

    Do you requery the subform after you update the query?
  8. C

    Mail merge query results

    1) When you are in the code window click on the Insert menu at the top and then click Module 2)If you put the code in that I gave you then you have a function called GetUserName. To call this function you would do something like this Dim sUserName as String sUserName = GetUserName That gives...
  9. C

    Merge tables

    Do a quey and export the query to excel.
  10. C

    Merge tables

    instead of merging the tables i think you should split them: 111,EEEE 222,AAAA 333,BBBB 444,CCCC 777,FFFF 444,22000 222,20000 333,10000 111,PRO 222,PRV 777,PSR
  11. C

    Need help with table normalization

    Questions: Can one board be part of more than one module? Can one engineer be the leader of more than one project? Can one project contain more than one module? Can one module be designed by more than one engineer/contractor? If Yes: Can one board be designed by more than one...
  12. C

    Mail merge query results

    Alrighty, Hows about this for an of the top of my head dirty solution Make a new Module in your VBA called modGetNames and put this code in it. Private Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long Public Function...
  13. C

    Mail merge query results

    I don't know much about mailmerge. Are you using a wizard in Word and browsing for the access database and then selecting a a query from a list. But you cant select the query cos it's run from the VBA and not saved as a query. Is that where you are at?
  14. C

    Add to list

    You could put an insert query in the IF statement If Response = vbYes Then Dim sInsertExercise As String sInsertExercise = "INSERT INTO tblExercise(ExerciseName) VALUES(""" & Me.Exercise_Name & """);" CurrentDb.Execute sInsertExercise Else You will need to requery...
  15. C

    Duplicate Accounts

    Have you tried the find duplicates query wizzard?
  16. C

    Wizard automatic queries

    The forms can be bound to a table or a query. However if it is bound to a table you should see the table name in the Record Source property.
  17. C

    Received Dates Query

    Forgive me but I am not even going to begin and pick my way through that syntax If you had a tables set up like this: (I don't know what you are storing so I'll use stupid generic names) YourTable(YourID, YourFields) YourRecieved(YourID, RecievedDate) Then you can query SELECT YourTable.*...
  18. C

    Select fields for query

    It's quite alright I used to be the same way. Now I almost sometimes know what I'm doing. ;) Can I give you a tip. When you want to do something and you don't know how to do it. After you finally manage to figure it out write down what you wanted to do and how you managed to achive it, cos...
  19. C

    Select fields for query

    I think this line may be causing you a problem strFieldList = Left(strCriteria, Len(strCriteria) - 2) What is strCriteria? You go to the trouble of looping through the selected items building your strFieldList string. For Each varItem In Me!lstFieldList.ItemsSelected...
  20. C

    Select fields for query

    underneath your 'Build Field List comment type Stop then open your form and test it out. When it hits the Stop line it will break into the code. now press F8 to move through the code this is a way of seeing exactly what your code is doing and with what. At any time you are moving through your...
Back
Top Bottom