Search results

  1. C

    Open database

    The benefit of getting the short file name with the API function I posted is resolving naming issues with the folder name as well. For instance, if the database is saved in a folder with a space in the name (i.e. Program Files) you will get the same conflict, as the shell command will truncate...
  2. C

    Save and reselect record rather than tabbing out

    in the lostFocus event of the last field use: txtbox1.setfocus where txtbox1 is the name of your first field
  3. C

    Open database

    add the following to a module in your database Private Declare Function GetShortPathName Lib "kernel32" Alias "GetShortPathNameA" (ByVal lpszLongPath As String, ByVal lpszShortPath As String, ByVal cchBuffer As Long) As Long Function ShortName(ByVal LongName As String) As String Dim sBuff As...
  4. C

    referencing filelen with a path

    weird...I edited my post and somehow you got both versions. I'll post again Dim intcount As Integer, varFile As Variant, objFileFind As Object, mysize As Long, mylength As String Set objFileFind = Application.FileSearch 'FindFiles 'Find the Files If Me!Expr1 <> "" Then With objFileFind...
  5. C

    Date code not working

    What is the error message displayed when trying to execute the date code?
  6. C

    referencing filelen with a path

    You need to assign the return value of the FileLen function to a variable. Right now the FileLen funciton is just hanging out with no where to go. Dim intcount As Integer, varFile As Variant, objFileFind As Object, mysize As Long, mylength As String Dim theLength Set objFileFind =...
  7. C

    referencing filelen with a path

    You need to assign the return value of the FileLen function to a variable. Right now the FileLen function is just hanging out with no where to go. Dim intcount As Integer, varFile As Variant, objFileFind As Object, mysize As Long, mylength As String Set objFileFind = Application.FileSearch...
  8. C

    Date code not working

    When it shows the background code. Click the Stop button to stop the code from executing. Then click Tools, References. You'll see a reference with MISSING in front of it. Uncheck this reference, and that should fix your problem.
  9. C

    Selecting Multiple values from a list

    add a textbox named txtClothing to the form and set the control source for txtClothing to the field in your table that you want to store the clothing value in. Then from the properties menu of the listbox clothing, click the Events tab. Then click the LostFocus row. When you click the LostFocus...
  10. C

    Updating a label with a series of messages

    MyLabel.caption = Format(index+1,"dddd")
  11. C

    Datasheet form to main form call help

    I don't think you'll be able to do this without code. You can use the command button wizard to help you write the code though. Let me know if you want me to walk you through it.
  12. C

    Online Database

    Try fp_sQry="SELECT * FROM SUBFORM WHERE (COMMODITY CODE = '" & ::COMMODITY CODE:: & "')" By the way is subform the name of a table or query? If not this won't work. If so, you probably shouldn't name a table or query "subform"
  13. C

    Inserting File into Word - Setting Selection

    Insert a bookmark in the word document called "InsertHere", then try With objWord.ActiveDocument.Bookmarks("InsertHere").Select before you insert the file
  14. C

    Selecting Multiple values from a list

    What is the NAME of the listbox control, and the NAME of the textbox control on your form?
  15. C

    Selecting Multiple values from a list

    On your form, do you have the list box and the textbox that you would like to store the values selected? If so, what are the control names of the listbox and textbox. (Right click, select properties then look at Name on the All tab)
  16. C

    Selecting Multiple values from a list

    Yes, it is code that runs when the listbox loses focus. Do you need help implementing it?
  17. C

    Selecting Multiple values from a list

    What I would do is loop through the selecteditems collection of the listbox and concatenate comma separated values in a string. Then store the string in the desired textbox. Like Private Sub myList_LostFocus() Dim strList As String strList = "" For Each Item In myList.ItemsSelected...
  18. C

    Pulling only one record from many side

    Pat beat me to the punch! It is nice to know my method is endorsed by a guru.
  19. C

    Pulling only one record from many side

    I ran into this same issue when we decided to implement Effective Dating. The way I solved the problem was to create a query to only pull the distinct most recent value from the "many" table, then join that query between the one and many tables. Example: Customers, Orders in northwind. To pull...
  20. C

    sub form

    Try something like Select Max(DateofRaiseField) as RaiseDate, RaiseAmount from Your Table Group BY RaiseAmount
Back
Top Bottom