Search results

  1. K

    Capture User/Machine ID

    Hi, you should be able to pull them up with environ("computername") and environ("username") HTH Drew
  2. K

    Restore a table index using VBA

    Hi Aziz I agree with everything above, it's bad to let people into tables and I'm not sure that the below will really help with the ordering. Additionaly I can't really see what you're achieving with the ordering of the recordset anyway, you really should make the order an intrinsic...
  3. K

    TxtDocument Feld Launch Doc. in TxtBox

    Hi again, if you modify the below code to read strFilePath=me.YourTextBoxName instead of strFilePath = "Full Path to File\FileName.doc" it will open the file listed in your text box in word. I'm assuming here that you have the name and path of the file you want in this text box. If not...
  4. K

    Identifying Users on Multiuser Environment

    Hi gregmiami, you can probably change the below to get out some of what you want. you can read the .ldb directly as a text file ( just send it to notepad ) and see what it contains. Our PC names here are 10 chars long, if yours are a different length then just change the 12 below to a...
  5. K

    TxtDocument Feld Launch Doc. in TxtBox

    hi dbbaisley, if you just want to open Word with your selected/entered doc in it then you can use Dim strFilePath As String strFilePath = "Full Path to File\FileName.doc" ' you should be able to get this from your text box(?). Shell "C:\Program Files\Microsoft Office\Office\WINWORD.EXE "...
  6. K

    URGENT! VBA and queries

    Hi Everton, the problem is in your criteria clause, you need to specify a date rather than pass in the query. from the help files :- An optional string expression used to restrict the range of data on which the DLookup function is performed. For example, criteria is often equivalent to the...
  7. K

    Loop through List Box

    Hi Kurzo, you need to do a for each - items selected. You may also need to do a check for a null value as there can be nothing selected in the box sometimes, For Each vItem In Me.lstBooked.ItemsSelected myKey = DateConvert(Me!lstBooked.ItemData(vItem)) if MsgBox("Are you sure you want...
  8. K

    Returning multiple values from a function

    Hi, you can do it one of two ways 1/ make your function return a recordset eg public function MyRecords(lngWhataver as long...) as recordset 'etc etc end function or 2/ use ByRef in the functions arguments list eg if you need to pass in one value to get the record you want and need to pass...
  9. K

    Open file

    hi Anthony, the onyl way you can get the colour back to what it was ( as far as I know ) is to use the MouseMove again with something like If Me.Text1.BackColor = 1974 Then Me.Text1.BackColor = 1001 Else Me.Text1.BackColor = 1974 End If it really doesn't work very well, you may be...
  10. K

    Filenaming

    Hi, you can do it one of two ways. If you want to copy the file ( and end up with 2 'versions' ) the use FileCopy. if you want to just move the file ( and have only one 'version' in the end then use Name. for example; FileCopy; function CopyTheFile() if dir(YourPathHere &...
  11. K

    Update Statement

    Hi Tammy, I think it's one of 1/ It doesn't like your - ( minus )signs and # ( hashes, pounds to you americans...). Which is likely. # are delimiters for date time strings. If you ever need to base a query on a date, you would pass it in as #21/12/00#, or, more likely #12/21/00#...
  12. K

    Workday function

    Hi Jonp, apologies for posting code this lame, but as you've got no other replies, I guess it may at least nudge someone else to posting(?) and in the meantime it does work. Function WorkAday(ByVal dtmStartDate As Date, dtmEndDate As Date) As Byte ' Change bytes to Integer if more than 255...
  13. K

    deleting a query

    Hi Jordan, the below should work Sub findQry() Dim q As QueryDef For Each q In CurrentDb.QueryDefs If q.name = "QueryName" Then DoCmd.DeleteObject acQuery, "QueryName" End If Next End Sub HTH Drew [This message has been edited by KDg (edited 10-01-2000).]
  14. K

    Auto-Mail in Outlook

    aahhh I see, spot on Mitch, many thanks - as the message was only "Dear All, Please see attached" I think I'll scrap it. Thanks for your help, Drew
  15. K

    Creating Export Specifications Using VBA

    Hi Dan, the below is an abbreviated version of the code I have run when the database is opened by the first user of the day. You'll need to change the Chr(xx) bits if you just want spaces rather than " and , It could also do with being more flexible so that fields and new tables are...
  16. K

    Auto-Mail in Outlook

    kindly think before posting - the mail is generated from code in access. If it was in Outlook it would be VBScript not VBA, but then as a developer I guess you'd know that. thanks anyway... [This message has been edited by KDg (edited 06-14-2000).]
  17. K

    Auto-Mail in Outlook

    Hi, thanks for reading this - does anyone know how to get the user's auto-signature to show in Outlook when generating the mail from VBA? I can't see anything that looks likely in there, many thanks in advance Drew
  18. K

    Tab Control Focus

    Hi Jamie, you need to use; Me!TabCtl0.Pages(2).SetFocus replacing TabCtl0 with whatever the name of your tab ctl is. You want to place the code in the On_Open of you form if it will happen every time the form is opened ( but why not just make it tab 1 then ? ) or, more likely I...
  19. K

    Filling Arrays

    Hi Ayesha, you should be able to use Instr(), mixed with left,mid or right to read out what you need in any order. For example. Starting at the left use instr to find the first comma, once you've found it read everything to the left of it into your array. Either truncate the string to...
  20. K

    Outlook Recipients.Add only allows single email address

    Hi Llyal, you'll be glad to know you are missing something. You can use objMail.To in the same way as .CC and.BCC HTH Drew
Back
Top Bottom