Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. JamieDeVry

    Open Form on Correct Record

    the mismatch error is becasue I failed to realize that the Employee ID is in a numerical format so your code should now look as follows: Private Sub lstEmployee_DblClick(Cancel As Integer) Dim intEmployeeID As Integer intEmployeeID = Me.lstEmployee.Value DoCmd.OpenForm...
  2. JamieDeVry

    Open Form on Correct Record

    Hello Karl. Your problem is quite common. I will assume that the value that is stored in the listbox control has a primary key value. So the value '01' would be for the employee name Jamie Bates. When you douleClick over the listbox control it returns a value. Store that value in a...
  3. JamieDeVry

    Deleting a Record from a List Box Selection

    From in the click event of your delete control, you will need to capture the record that was selected. In order to do that, you will need to create a variable. You will also need a variable to delete the record using a SQL statement. For example: Sub cmdDelete_Click() Dim intValue As Integer...
  4. JamieDeVry

    Command Buttons don't work correctly

    My students always get that problem. They attempted to create the buttons more than once giving it the same name based on the same event. VB nor VBA allows for buplicate control names on the same form/dialog. Press Alt+F11 to get the VBE and remove one of the event procedures Sub...
  5. JamieDeVry

    ApplyFilter - I don't want it to save

    Use the Forms Open Method and set the ApplyFilter property to Null Sub Form_Open() Me.ApplyFilter="" End Sub God Bless! Jamie http://nj.devry.edu/~jbates
  6. JamieDeVry

    Labels and text boxes how can I 'not' show em on a report

    Lonnie gives a best practise recommendation. He is totally correct. The way you are collecting the data is problematic. This would require that you first change the structure of your database. In the meantime, you will want to create a recordset loop to determine the number of records that...
  7. JamieDeVry

    QueryDef and DAO reference????

    The problem is with your declaration. Microsoft Access support ADO and DAO. You now must specifiy the recordset you want to work with. Dim MyDb as DAO.Database Dim MySet as DAO.Recordset Set MyDb = CurrentDB Set MySet = MyDb.Openrecordset("YourQueryName", DB_OPEN_DYNASET)...
  8. JamieDeVry

    how do you pull data from table and display it in msgbox?

    I do not think the above reply answers your question. Below I have some example code that tells me how many records there are in a table named tblMember. I am using DAO. So you will have to make a library ink to the DAO library in order for this to work. Simply replace the table name...
  9. JamieDeVry

    current position within document

    The Information Property is used to return most most if not all of the information found in the Stats dialog. the example line of code returns the exact line number where my insertion point is: Dim intStart as Integer intStart = Selection.Information(wdFirstCharacterLineNumber) To determine...
  10. JamieDeVry

    Reduce Size of Excel Macros

    I do not think that your code is the problem. I would consider boosting your hardware a little. Code takes very little space. If you would like, I can review your code for you. Simply copy and paste it in the next thread. Jamie http://nj.devry.edu/~jbates
  11. JamieDeVry

    What is the Pathname Variable?

    ... use PathName to return the directory location of the workbook, use the name property to return the name of the workbook, use the FullName property to return the path and name of the workbook. Jamie
  12. JamieDeVry

    What is the Pathname Variable?

    PathName is not a variable. It is a property of the workbooks object collection and it is used to return the path anf file name of the workbook in question. for example: sub mcrTest Dim strPath as string strPath = activeworkbook.pathname msgbox strPath end sub Jamie 'DeVry'
  13. JamieDeVry

    Cell formatting bug

    ... or if you know vba programming, you code use the following code for each cell in selection cell = cell * 1 Next or Do Until ActiveCell = "" Activecell = Activecell * 1 ActiveCell.Offset(1,0).select Loop either loop should work for you if applied appropriately Jamie...
  14. JamieDeVry

    Cell formatting bug

    Since the data was downloaded from a database, Excel will treat all values as text. the solution i used to use was that i placed the value 1 next to each each value that i wanted to update as numeric, then i multiplied it by copying a using paste special and choosing to multiply the numeric...
  15. JamieDeVry

    CreateControl on current form help

    I had that problem a few years ago, and I believe my solution was to save the dialog updates to disk before using the OpenForm method. Jamie
  16. JamieDeVry

    create relationship by code ?

    That was a good solution. You can use DAO or ADO to program relationships. However, I prefer to use the old fashion embedded SQL solution. This first procedure is used to create a Validation table: Sub mcrCreateMemberType() 'MEMBER TABLE strTable = "CREATE TABLE tlkpMemberType " &...

Part and Inventory Search

Back
Top