Results 1 to 3 of 3
  1. #1
    PauloMaia is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2018
    Location
    Brasil
    Posts
    2

    Relatório em sequencia por data

    Eu estou fazendo assim...

    E quase esta dando certo /// o problema é que o relatório esta gerando para primeira data e para a ultima e pulando as do meio /// e repetindo essas duas datas um monte de vezes , se esse for o caminho então preciso ajustar meu While

    ---

    I'm doing this ...


    And almost this workin '/// the problem is that the report is generating for the first date and for the last and jumping the middle /// and repeating these two dates a lot of times, if that is the way then I need to adjust my While

    Private Sub btn_03_Click()
    Me!datas = Me!txtDatIni
    Dim iniDate As Date
    Dim endDate As Date

    iniDate = Me!txtDatIni
    endDate = Me!txtDatFim

    If VerData(txtDatIni, txtDatFim) Then
    If Not IsNull(txtDatIni) And Not IsNull(txtDatFim) Then

    Do While iniDate < endDate
    DoCmd.OpenReport "ReceitasVsDespesas-D", acViewPreview
    iniDate = DateAdd("d", 1, iniDate)


    Me!datas = iniDate
    Loop

    End If
    End If

    End Sub
    my 3 sub reports are looking at the form field === Me! dates


    This field should change every lup and the report is generated every time based on that date of this field of form ......


    And this lup there is stopping a date before, would have to stop when it was equal to txtDatFim


    Need help ...

    ---

    os meus 3 sub relatórios estão olhando para o campo do formulario === Me!datas

    Esse campo deveria mudar a cada lup e o relatório ser gerado a cada vês baseado nessa data desse campo do form ......

    E esse lup ai esta parando uma data antes, teria que parar quando fosse igual a txtDatFim

    Preciso de Ajuda ...
    Last edited by PauloMaia; 01-29-2018 at 10:22 AM. Reason: Sequence report by date

  2. #2
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,474
    If you need it to include the end date, use <= so Do While iniDate < = endDate

    Also you said your dates look at Me!dates but in your code it is Me!datas

  3. #3
    PauloMaia is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jan 2018
    Location
    Brasil
    Posts
    2
    sim Me!datas

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 7
    Last Post: 07-24-2017, 11:47 PM
  2. Replies: 9
    Last Post: 03-01-2017, 10:00 AM
  3. Relatório não acoplado
    By gildezio in forum Reports
    Replies: 1
    Last Post: 05-17-2015, 08:22 AM
  4. Relatorio resumo com total de cada campo
    By gildezio in forum Reports
    Replies: 1
    Last Post: 05-14-2015, 04:15 PM
  5. Replies: 1
    Last Post: 12-21-2011, 02:11 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums