Search results

  1. D

    Copy table structure only

    boblarson, thank-you very much! I'm obviously not very diligent in searching for answers to particular database problems. I was just about to post the following, when I read your thread. Sub CopyTableII() On Error GoTo xxx Dim fld As Field, td As TableDefs, prp As Property Dim tTable...
  2. D

    Copy table structure only

    Absolutely, and bear with me for not being more diligent in finding the proper method, I thought as a work around... DoCmd.CopyObject, "LU_WMCHDL_Inf_v2", acTable, "LU_WMCHDL_Inf_v1" CurrentProject.Connection.Execute _ "DELETE FROM LU_WMCHDL_Inf_v2" But again, I don't want to discourage...
  3. D

    append a record to a table using vba where the table contains an autonumber

    Not sure if ReclusiveMonkey had the same response but... 1. Don't populate AutoNumber fields. 2. Assuming gthe 2 fields mentioned are not autonumber fields...too many brackets 3. are the ID fields strings? If not, remove single quotes. mySQL = "INSERT INTO SupplierProductsTBL ( SupplierID...
  4. D

    Copy table structure only

    Have you considered the "CopyObject" method? DoCmd.CopyObject, "LU_WMCHDL_Inf_v2", acTable, "LU_WMCHDL_Inf_v1"
  5. D

    TextBox/Table question

    Owen, First of all, Wazz is correct, it is "FlintStone", not "Flinstone". Secondly, If I've understood correctly, your form is UNBOUND? It's the combobox the has the "Associated Table"? Wazz's code, is very effective for finding records through a bound Form. But what you may want, is to...
  6. D

    number of records?

    cyberpac9, all you need is a DCount() result. Not need to run a query or open a recordset. Look up DCount in VBA help. Dim intCount As Integer Dim strCriteria As string strCriteria = "txtCountry Like 'A*'" intCount = DCount("pkID","tblCountry",strCriteria)
  7. D

    Strange problem with recordsets

    As both above said. Simply put, if it's just the record count you want then, Dim R as DAO.Recordset 'do distinguish Set R = CurrentDb.OpenRecordset("SELECT * FROM MY_TABLE") R.moveFirst R.MoveLast 'move both ways is more reliable intCount = R.RecordCount R.Close: Set R = Nothing NOW, if...
  8. D

    A SELECT COUNT(ID) query to put result in a var. in VBA

    Yo Clive, It's as easy as using a simple aggregate function, in the Control Source, of your textbox. Your text box should be unbound. Not linked to any table. Make sure the name of the text box, is not the same as another control on your form, or a field from the underlying table itself. in...
  9. D

    new year in access data base

    Sort of. Does this imply, you know where the code is? or you know the name of the module, the code is in? If not, do you know the name of the File or Directory, the data is saved in? If so, you could do a search from the VBE window, using the File or Directory name, to at least find the code...
  10. D

    Email more than one report

    You mean, so 2 reports become 1 attachment? You would have to combine them onto 1 file, I think? Maybe using Word automation. I've tried this a little, but can't retain the formatting that was in the original report. But I can consolidate several reports, onto 1 Word doc. Is this an option?
  11. D

    insert an array with INSERT INTO

    Yes, you're right Pat. An oversight on my part.
  12. D

    Email more than one report

    Are you familiar with Outlook Automation?
  13. D

    SQL Syntax with CurrentProject.Connection.Execute when variables are empty

    No, outside of using Nz()? Maybe your data won't "allow" default values? Meaning, it's not an option? sqlstring = "INSERT INTO SystemData (MS_Key,Period,StartTime,EndTime,ProcessType,Notes ) VALUES (" _ & Nz(nKey,1) & "," & Nz(gblcurrentperiod,"1/1/05") & "," & Nz(psdstarttime ,"#12/12/06#")&...
  14. D

    Regrouping Split Date Values

    As raskew, very astutely said. Also, just for the record, you could use CDate(). If you join the 3 values into a string, then Cdate(), will convert it to a Date, data type. Dim dteDate As Date dteDate = CDate(Me.txtMonth & "/" & Me.txtDay & "/" & Me.txtYear)
  15. D

    insert an array with INSERT INTO

    filo, I'm not sure if DAO has the option, to insert an entire array at once but, ADO does. Dim rec as ADODB.Recordset Set rec = New ADODB.Recordset 'My syntax is off here rec.Open "tblCountry", CurrentProject.Connection, acDynamicCursor, acLockOptimistic rec.AddNew Array(txtCountry...
  16. D

    Sending 2 reports to 1 Fax in Winfax Pro

    Eddy, I've been obsessed with this problem. This is a recent revelation to me. You can send more than one attachment to WinFax. strFile = "C:\Documents and Settings\Dan\My Documents\Deficiencies.doc" strFile2 = "C:\Documents and Settings\Dan\My Documents\Laila Songs And Artists.txt"...
  17. D

    Combo box and subforms

    Forgot to mention, I don't believe, ADO has a recordsetclone object. You should be using DAO. Dim rs As DAO.Recordset
  18. D

    Sending 2 reports to 1 Fax in Winfax Pro

    I retract, I see that WinFax is your default printer.... That's how opening a report in normal view, sends to Winfax.
  19. D

    Sending 2 reports to 1 Fax in Winfax Pro

    Eddy, I'm not that familiar with WinFax automation, but a little with just regular coding with winFax. I'm surprised to see that by just "Opening" a report, WinFax will use this as the attachment? The code I use, first creates a snapshot file of my report, then I use the path of that file, as...
  20. D

    Combo box and subforms

    NOT Set rs = Me.Recordset.Clone BUT Set rs = Me.Recordsetclone
Back
Top Bottom