Search results

  1. T

    Problem passing data

    Open a Modal Form Did this a while ago and it works fine 'This is the Memo field on the Form - strClientNumber is the linking record Private Sub Notes_DblClick(Cancel As Integer) DoCmd.RunCommand acCmdSaveRecord Number.SetFocus strClientNumber = Number.Value DoCmd.OpenForm...
  2. T

    I need Help with Case Statement

    Not sure if this the answer you are seeking but maybe create a variable and give it a value for each version of the report. Then call the report by giving the variable a value and then use that to determine which of the Select Case options is chosen so that the appropriate report is opened. If...
  3. T

    Reset check boxes

    As I said - an Update query is far easier. Just set the value to 0. You call the Update query with simple Docmd statement.
  4. T

    Show MsgBox rather than Standard Access Error

    Q1 - Cancel = True cancels the exit and effectively locks the focus back BUT be careful with this as you may not be able to close the form with a blank field which could prove to be a problem with New Record and then changing your mind and want to cancel. Private Sub FieldName_Exit(Cancel As...
  5. T

    Getting values from text boxes

    Try something like this. It should work. Be VERY careful with the ' and " syntax. It is " [Field] = ' " & strvariable & " ' " without all the spaces. You will need to make the three string variables, don't forget to Dim them as String, with the value from the combo boxes but that...
  6. T

    Getting values from text boxes

    Need more info. Sounds like you need a couple of variables that are filled when some event takes place.
  7. T

    Filter Query By Date

    Further bit of code after the statement Me.FilterOn = True Private Sub Form_Open(Cancel As Integer) Dim datDate As Date Dim strDate As String DateasString.Visible = False FilterDate.Visible = False datDate = Date strDate = Left(datDate, 5) Me.Filter = "FilterDate = '" & strDate & "'"...
  8. T

    Filter Query By Date

    Even better solution Just create two new fields on your form called DateAsString and FilterDate connected to the Query in the sample. Then use the following code. The forms underlying query does require these two additional calculation fields as per the sample db1 provided previously...
  9. T

    Filter Query By Date

    Converting Date to a String Try this - open Form1 and press the button. Hopefully you can follow the steps which can all be done within Form 1 by code if you like.
  10. T

    Reset check boxes

    Or run an update query and call it from a Docmd.
  11. T

    Show MsgBox rather than Standard Access Error

    On Exit code You can't call the field Name - it must be a reserved word within this context. The atached works so run with this. :)
  12. T

    Show MsgBox rather than Standard Access Error

    Try managing the error using the On Exit property of the field e.g. If Me.Field = "" or isnull(Me.Field) then msgbox "Field Needed" Field.SetFocus else End If
  13. T

    Show MsgBox rather than Standard Access Error

    Try managing the error using the ON EXit
  14. T

    Query output to emails

    e-Mail Lots on this site but try and pick the code out of this Module. I don't claim any credit for the basic code as I took it from this site anyway. I have just adapted it to include an attachment too. One thing though, because XP has a virus scanning check on e-mails being sent out, you...
  15. T

    Printing Reports to different Printers

    There have been several threads relating to what I have found to be a complex subject. I have 2 reports, called in succession but one needs to go to a standard printer, the other to a PDF file I do not want to chose the printer for each report by having to select a printer via a dialog box; I...
  16. T

    Open a form as acDialog

    I have a main form that opens another in acDialog mode in order to get two input pieces of data for use in a subsequent Action query. In order to keep these two pieces of data availble rather than closing the "acDialog" form, I have a button to hide it [ me.visible = false ] However, when the...
  17. T

    re-size acDialog box

    Thanks - I wasn't aware I could control the form size this way; I usually just Maximise.
  18. T

    Input mask for surname with '

    For the first letter being a Capital, this is easy. Put an Input mask on the Table and the Form like >C<????????????????????????????????;; where the ???? is the maximum number of other characters. (Tie this into the field size). I don't think you are going to be able to do the O'C on the same...
  19. T

    re-size acDialog box

    I use the Docmd.open form with acDialog parameter as I need to interrupt the code for the user to select some information before proceeding. Is there anyway to control the size of the dialog box as currently in a continuous form format, it only shows 3-4 records. The screen is large enough to...
  20. T

    Fax

    One other option; I have heard of is to use Winfax which certainly used to integrate into access.
Back
Top Bottom