Search results

  1. A

    checkbox clear

    Private Sub Check253_AfterUpdate() Me.Text255 = Environ("UserName") If Me.Check253 = -1 Then Me.Text254 = DLookup("[Lot]", "[tblAutoGen]", "[Inuse] = -1") Me.Text256 = DLookup("[Exp]", "[tblAutoGen]", "[Inuse] = -1") Me.Text258 = DLookup("[Lot]", "[tblEthanol]", "[Inuse] = -1")...
  2. A

    populate textbox based on user log in

    Private Sub Check253_AfterUpdate() If Me.Check253 = -1 Then Me.Text254 = DLookup("[Lot]", "[tblAutoGen]", "[Inuse] = -1") Me.Text256 = DLookup("[Exp]", "[tblAutoGen]", "[Inuse] = -1") Me.Text258 = DLookup("[Lot]", "[tblEthanol]", "[Inuse] = -1") Me.Text260 = DLookup("[Exp]"...
  3. A

    checkbox click

    Private Sub Check248_Click() If Me.Check248 = 0 Then Me.Text254 = DLookup("[Lot]", "[tblAutoGen]", "[Inuse] = -1") Me.Text256 = DLookup("[Exp]", "[tblAutoGen]", "[Inuse] = -1") Me.Text258 = DLookup("[Lot]", "[tblEthanol]", "[Inuse] = -1") Me.Text260 = DLookup("[Exp]"...
  4. A

    AfterUpdate checkbox

    If I have a checkbox (chk230) on a form, that if checked will populate a textbox (Text100), would the code be something like this: Private Sub AfterUpdate chk230 () If Me.chk230 = 0 Then Text100 = "Yes" ElsIf Me.chx230 = 1 Then Text100 = "No" End If End Sub Thanks.
  5. A

    report from form

    How does it know what recievedate to use? DoCmd.OpenReport "Patients", , , "Len(Exception & '') > 0 AND Labeceivedate > #" & Forms!Patients.Labrecievedate & "#" Thank you.
  6. A

    report from form

    Private Sub Command16_Click() DoCmd.OpenReport "Patients", , , "Len(Exception & '') > 0" End Sub The above code works (thank you pbaldy for your help), but there are only 10 reports as of today. In 3 month there might be 50. Is there a way to use recievedate, which is in the report, as a...
  7. A

    form report

    That seemed to work at least now you get a filtered list of the exceptions. Is there a way to print of those? Thanks.
  8. A

    form report

    I removed the checkbox as you suggested it made no sense. Private Sub Command243_Click() DoCmd.OpenForm "Patients", , , "Exception = '" & Me.Exception & "'" End Sub The form is called Patients The field with the data in it is Exception and the control is Exception If there are 40 records in...
  9. A

    form report

    The data type for the exception field is text. Thank you.
  10. A

    form report

    Private Sub Command243_Click() DoCmd.OpenForm "Patients", , , "Exception = " & Me.Check237 End Sub Data type mismatch in criteria expression and the DoCmd. line is highlighted. I tried the other as well with the same result. Thanks.
  11. A

    form report

    Private Sub Command243_Click() DoCmd.OpenForm "Patients", , , "Exception = " & Me.Check237 = 1 End Sub The above code gives a filtered form with no records in it. There should be 5, but is it possible to list them in a table that can be printed automatically or by date range? Thank you.
  12. A

    form report

    So then all I would need is something like: Private Sub Command_Click () DoCmd.OpenForm "Patients", , , "Text239 = " & Me.Exception End Sub Patients is the form Text239 is the textbox and thhe control is Exception (which is only visible when Check237 is selected). Thank you.
  13. A

    form report

    Private Sub Command_Click () Dim Text239 As String DoCmd.OpenReport "Exception Log", acViewPreview, , strWhereExeception & " strWhereException = "[Text239] = " & Forms![Patients]!SelectException” End Sub I have a textbox (Text239) on a form that is only visible if a checkbox is selected...
  14. A

    exception report

    I have a field on a form (exception) that is also a column in a query. I would like to create a report an only show those records that had an exception in it. I am not sure what criteria in the query to use, but it would seem creating a report off of this query would work. Thank you.
  15. A

    visible after update

    After Update code: Private Sub Check237_Click() Me.Text239.Visible = Check237 End Sub Form On-Current code: Private Sub Form_Current() If Me![Check237] Then Me![Text239].Visible = True End If End Sub I set the visible property of Text239 to "NO" and then put the code above in the...
  16. A

    user click code

    Private Sub Check237_Click() Me.Text239.Visible =Check237 End Sub I am using this code and it seems to work, but only after I open the form and check the checkbox and then uncheck it. Once I do that it functions as it should, but then when I close the form it does not save the checkbox...
  17. A

    user click code

    Private Sub Check237_Click() If Me.Check237.Value = "yes" Then Me.Text239.Visible = True Else Me.Text239.Visible = fasle End If End Sub I am using the code above and what the desired action is when the Check237 is checked then the Text239 is visible for the user to put in a comment...
  18. A

    after update text

    Is this correct? Private Sub Text45_AfterUpdate() If Me.Text45 = "Test" Then Check235 The visible property of Check235 is Yes Do I need to do anything in Check235? How does it know to only be visible if the criteria is met? Thank you.
  19. A

    after update text

    Is it possible in Access 2010 to have an after update that if a criteria text is met, then a checkbox with the text "completed" appears next to it? Private Sub Text45 () If Me.Text45 = "Test" THEN ... Thank you.
  20. A

    calculated control

    I would like to have a textbox on a form and in the control source I have: ([OrderDate] - [DOB] <+ 30, "Yes","No" Is this correct in order to check to see weather a sample is less than 30 days and if it is in that textbox Yes appears, otherwise No? Thank you.
Back
Top Bottom