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. eljakim

    delete records via code

    Re: Add delay Are you sure that you tell your subform to refresh? ie, Docmd.RunSQL "insert blah blah blah" Me.Sub0.Requery this should solve your problem. Kim
  2. eljakim

    delete records via code

    Elizabeth, I use the _ to mark that a statement has not been finished at the end of the line. This is an Access feature that provides you with the possibility to spread a statement over several lines... (for readability purposes) ie docmd.runsql xxx & yyy & zzz might be too long to fit...
  3. eljakim

    Leading zeros

    Or you could typecast the textstring to a number, this would yield: txtDisplayControl = Format(CLng(txtCustomerNo),"000000000") This will only work of course, if the value in txtCustomerNo can actually be converted into a number. Hope this helps... Kim
  4. eljakim

    delete records via code

    You cannot run an SQL query on a recordset. Why don't you just use: Dim StrSQL As String strSQL = "delete * from [tblSubform] " & _ "where (LoadsetLinkID =" & Me.LoadsetRecID) & ")" & _ "and (application=""" & me.cboApplist &...
  5. eljakim

    Automating Email and PDF Creation, then Attaching files

    The last missing answer is de PDF creation part... Either buy Adobe Distiller to generate PDF files, or use a free utility (http://www.webxd.com/zipguy/freepdf.htm) to generate them. You should now have enough information to finish the project :) If you have any questions, just let me know. Kim
  6. eljakim

    Automating Email and PDF Creation, then Attaching files

    To solve your last problem: Just add Outlook to your module references and use the following code: Public Sub SendItemsByMail(email As String _ , employee As String _ , phone As String _ , provider As String _...
  7. eljakim

    Global values and queries

    Trudye, in Access you cannot access *global variables* from your SQL query. You can access *functions*. The solution presented above used this to 'simulate' global variables. If you really want to use variables, store them in a seperate table and provide a link to this table. Kim
  8. eljakim

    delete records via code

    Elisabeth, the solution is simple: Your SQL query actually reads: Delete * from rsGroup Where application = xxxx This will not work if application is a string value. You would need an SQL query that looks like Delete * from rsGroup Where application = "xxxx" To achieve this you...
  9. eljakim

    Global values and queries

    The answer remains the same. 1) create a module that contains the variable, plus a function that returns the value of the variable 2) just use the result of this function in your SQL code from the query designer... But you do have to set the value of the variable first. So the SQL would look...
  10. eljakim

    Getdata.Edit - method not found error

    Hmmm... you may have to remove another module that references some ADO or OLE modules. Sometimes their recordset datatype conflicts with the DAO one. This usually helps me fine.
  11. eljakim

    Getdata.Edit - method not found error

    Has GetData been properly declared? Dim GetData As Recordset Are you using Access 2000? If so, you may want to check the module references; make sure you have the DAO reference included. Kim
  12. eljakim

    Opening an Access database using VBA in Excel

    Hi Deco, Off the top of my head I am writing you an example. If you need more info, just let me know. I hope this helps you. Kim Dim db As Database Dim rst As Recordset Set db = Workspaces(0).OpenDatabase("accessdb.mdb") Set rst = db.OpenRecordset("mytable&quot...
  13. eljakim

    delete records via code

    Actually, that last post will not work. The object 'db' that you are using does not exist... You would have to use dim db as database set db = currentdb() db.execute "delete * from TABLE" I usually use docmd... To suppress the warning you can use: docmd.setwarnings false docmd.runsql...
  14. eljakim

    Getdata.Edit - method not found error

    Could you provide a little more information? A sample of the sourcecode would probably help... Kim
  15. eljakim

    Run a Macro from a Shortcut Key?

    Quintios, you could add a 'feature' of course, so store comments in a separate table. I usually do this to make sure of the following: - owner of the comment gets filled in automatically (windowsname) - date/time get filled in - comment gets filled in If you use one big memofield and someone...
  16. eljakim

    Run a Macro from a Shortcut Key?

    Disregard my last post... Just go for 2^15-1 exactly 32.767, but nicely written :)
  17. eljakim

    Run a Macro from a Shortcut Key?

    Quintios, selLength returns an integer, this means it ranges between -32.768 and 32.767... To be on the safe side I would recommend just using 32.000.... However, memofields of that size are totally unreadable... Who would want to type that much text into a single field? Yours, Kim
  18. eljakim

    Run a Macro from a Shortcut Key?

    Hi Quintios, the problem you stated has a quite elegant solution if you are using Access 2000. For textboxes Access provides you with the properties selstart, sellength and seltext. You do have to take care that while a user is editing the value of a textbox you can only retreive this value by...

Part and Inventory Search

Back
Top