Search results

  1. J

    Solved Subreport GoToRecord

    Hello , I have three forms , based in the same table , in order to show the first , second and third records. The following code in each form works properly: Private Sub Form_Open(Cancel As Integer) DoCmd.OpenForm "Form 1", acNormal DoCmd.GoToRecord acDataForm, "Form 1", acGoTo, 1 End Sub...
  2. J

    Date interval

    Hello, I have table in a database with two date fields , admission and discharge date to a clinic . I can count the days between this two dates in a query . Now I want to know how many people is present at a single day (x day). I think it is possible making an expresion like : x day ...
  3. J

    To count records in a query whitout duplicates

    Hello , I have a query based in a table and in another query. They are related by an index field of the table and the same field in a query wich is not a key field. The field 'Nro de Orden' in the table is a key field and there are 13 records. The query shows 23 records. I grouped it by 'Nro...
  4. J

    To open form with a specified record

    Hello , I have a form , Form1 , in wich I can see the second record of a query. I wrote this code : DoCmd.GoToRecord , , acGoTo, 2 at the OnOpen event and it works properly showing the second record of the query with an Autonumber field. Now I made a new form , Form2 , from a different...
  5. J

    To count records in a query

    Hello, I have a field in a table with a restricted number of values from 1 to 10. I consider each number a category and I want to count how many records there are in each one. I can group and count the records in a query but there are only nine criteria to fill in , so the last number...
  6. J

    Question Related fields in a query

    Hello , I have an Acces Database and an Excell sheet with different fields about the same people , proceeding of two areas of the same institution. Now I want to join both files in a new database. I import to a new Access Database the Excell sheet succesfully. Now I want to make a query with...
  7. J

    Duplicate record and open form

    Hello ,I have a table in a database with quite similar records , and a few changes in each new record. So I need a code that duplicate the last record from a form and open another form to modified this record. I used this two codes each one in a different command button and it works, but not...
  8. J

    Show the first record

    Hello , I have a table with many numeric fields and I want to make a query that shows the first record of a descending order for each field. For example , Table Id Field1 Field2 Fied3 Field4 1 19 31 54 90 2 45 66 71 28 3 23 37 45...
  9. J

    Code for all records

    Hello , I have this code and it applies on one record when click on a command button in a form. If (Me.pH.Value < 7.15) Then Me.pH_ApII.Value = 4 ElseIf (Me.pH.Value < 7.25) Then Me.pH_ApII.Value = 3 ElseIf (Me.pH.Value < 7.32) Then Me.pH_ApII.Value = 1 ElseIf (Me.pH.Value < 7.49) Then...
  10. J

    Time limited query

    Hello , I need a query that retrieves all records 24hs ahead from de first record . The date added field in my table is in format : 6/5/2017 21:06:00 So,if the first record is in this moment I want only records until tomorrow , 7/5/2017 21:05:00. I tried this : date < [Admission]+1 , but...
  11. J

    DateAdd in a query

    Hello , I have a table with date and time fields and need to retrieve the records within 24 hs from de first record. I tried DateAdd (h , 24, [FirstDate] ) with many variants as a criteria in a query and even as VBA code , but doesn't work. Can you help me?
  12. J

    Querry

    Hello, I have a querry with this calculated field : Expr1: DCont("[hta]","Pacientes antecedentes totales","[HTA]='1' ")/DCont("[HTA]","Pacientes antecedentes totales")*100 It is a percentage of value 1 over the total registers with a value for HTA. If I apply a criteria in a diferent field...
  13. J

    To open a report with a query

    Hello ,I need some help with a Report. It is based on a query with this criteria in the field document number: [Forms]![Administrativos3]![Pacientes_Nro de documento] I have a Form with this fields : Pacientes_Nro de documento , edad , sexo , HTA. And many reports named Laboratorio . I try to...
  14. J

    Open report with conditions

    Hello I'm trying to open a report only if fields age>=50 , gender = male , language = french and type this : If Me.Age >= 50 Then DoCmd.OpenReport " Rpt1", acViewPreview If Me.Gender = Male Then DoCmd.OpenReport "Rpt1", acViewPreview If Me.language= french DoCmd.OpenReport "Rpt1" ...
  15. J

    Open report with three conditions

    Hello I'm trying to open a report only if fields age>50 , gender = male , language = french and type this : If Me.Age >= 50 Then DoCmd.OpenReport " Rpt1", acViewPreview If Me.Gender = Male Then DoCmd.OpenReport "Rpt1", acViewPreview If Me.language= french DoCmd.OpenReport "Rpt1" ...
  16. J

    JRPMD presentation

    Hello, I'm new in this forum. I work since many years with Access , but in a primary level. So I want to improve my knowledge about MS Access and Visual Basic programming. I search in other forums and was difficult to get the appropiate answers ( maybe because of my inexpertise) , but I like...
Top Bottom