Search results

  1. JPaulo

    Insert Into Complex

    The imagination is superior to knowledge, congratulations and thanks.
  2. JPaulo

    Insert Into Complex

    Thank you for all; My final code: Private Sub MyButton_Click() Dim dbs As DAO.Database Dim rst As DAO.Recordset Set dbs = CurrentDb Set rst = CurrentDb.OpenRecordset("Select * from tblSample ORDER BY ID ASC") Do While Not rst.EOF For nIndex = 0 To 99...
  3. JPaulo

    Insert Into Complex

    vbaInet fine friend ? I'm reversing the table and then export to Excel, that is my intention with this code. Now it works perfect. Thank you very much.
  4. JPaulo

    Insert Into Complex

    Works a charm. Thank you very much.
  5. JPaulo

    Insert Into Complex

    My database is working very well and this code too, just not logical I create 100 lines INERT INTO. Any idea ?
  6. JPaulo

    Insert Into Complex

    Hi all; My table in 100 fields and did not want to copy 100 times the INSERT INTO. It aims to do for all 100 fields, with only one line of INSERT INTO ? Private Sub MyButton_Click() Dim dbs As DAO.Database Dim rst As DAO.Recordset Set dbs = CurrentDb Set rst =...
  7. JPaulo

    Descending loop

    Sorry for my head, now works a charme. Very thanks friends Private Sub PreçoUnitário_Exit(Cancel As Integer) DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70 On Error Resume Next Dim strUP As String Dim db As DAO.Database Dim rst As DAO.Recordset Dim i As...
  8. JPaulo

    Descending loop

    Thanks for replying, as I put the ORDER BY DESC in cod ?
  9. JPaulo

    Descending loop

    Hi all; I want to update from the bottom up (descending), but this loop is doing from top to bottom, as reverse ? Private Sub PreçoUnitário_Exit(Cancel As Integer) DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70 On Error Resume Next Dim strUP As String Dim db...
  10. JPaulo

    How to hide all querys

    Thanks for the tip, solved. Function HideQuerys() Dim qry As QueryDef Dim x As Integer For Each qry In CurrentDb.QueryDefs If Left(qry.Name, 1) <> "~" Then If Not Left(qry.Name, 4) = "Usys" Then qry.Name = "Usys" & qry.Name End If...
  11. JPaulo

    How to hide all querys

    Hi all; I hide tables so, and to hide all querys? Dim Tb As TableDef For Each Tb In CurrentDb.TableDefs If Not Tb.Attributes And dbHiddenObject Then Tb.Attributes = Tb.Attributes Or dbHiddenObject End If Next MsgBox "All Tables have been occult. ", vbExclamation, "Aviso " Else For Each Tb In...
  12. JPaulo

    return login name (ND DESCRIPTION) ?

    Hi; Test and adapt Function MostraCompletoPCUser() Dim domain domain = Environ$("COMPUTERNAME") EnumUser domain End Function Sub EnumUser(strDomain) Dim Computer, User Set Computer = GetObject("WinNT://" & strDomain) Computer.Filter = Array("User") For Each User In Computer...
  13. JPaulo

    Printout Command, dispaly printer options

    Private Sub YourButton_Click() Dim stDocName As String stDocName = "yourReportname" DoCmd.OpenReport "yourReportname", acViewPreview On Error Resume Next ' If you cancel printing and generate error 2501 DoCmd.RunCommand acCmdPrint End Sub
  14. JPaulo

    Setting Specific Printer via VBA

    Hi; See this example in attc.
  15. JPaulo

    Open report in the last page

    Resolved, thanks to all the same; Private Sub Command10_Click() DoEvents DoCmd.OpenReport "Report1", acViewPreview SendKeys "{End}", True DoEvents End Sub
  16. JPaulo

    Open report in the last page

    Hi all; I want to open a report on the last page, but this code does not work, why? Access 2003 Private Sub Command10_Click() Dim I As Integer On Error Resume Next DoCmd.OpenReport "Report1", acViewPreview I = Reports!Report1.Pages SendKeys "{F5}{Delete}" SendKeys I & "{ENTER}" End Sub
  17. JPaulo

    import all modules

    Thanks for responding Bob, I test.
  18. JPaulo

    import all modules

    Hello friend. I know this method, but now I want a vba cod, it is possible ?
  19. JPaulo

    import all modules

    hi all; Vba code, how to import all modules another mdb ? Access 2003
  20. JPaulo

    Sum in Unbound Textbox

    Thank you very much friend. Now it's more than perfect. Good weekend
Back
Top Bottom