Search results

  1. D

    Strange Date Problem

    Thanks Thanks Pat, I used the Format() function for a similar report abd didn't realise that I didn't need it here.
  2. D

    calceling a report

    Try this You need to trap the error on the click event of the cmdbutton that opens the report. i.e. Private Sub CmdSearch_Click() On Error GoTo Err_CmdSearch_Click DoCmd.OpenReport "ReportName", acViewPreview Exit_CmdSearch_Click: Exit Sub Err_CmdSearch_Click: If Err = 2501...
  3. D

    Strange Date Problem

    Hi Guys I've created a search form that allows users to search for particular details by month, year and campus. All three are combo boxes. After the user has made their selection they click on search, this runs a query and opens a report with the details for the month and year at a particular...
  4. D

    Select All from combo box

    Thanks, I've got it sorted now Dave
  5. D

    Forcing capitalization

    On the KeyPress event of the texbox enter the following code; KeyAscii = Asc(UCase(Chr$(KeyAscii))) Dave
  6. D

    Select All from combo box

    Hi Guys I have a search form that allows users to search for records between certain dates and a combo box that will allow them to specify the records of a certain campus. At the moment the user enters the dates and the campus, they click on the search cmd button, which runs a query and a...
  7. D

    End If within End If

    Rich, the code in on the click event of the close command button. I know the code probably isn't the best way of doing the job, but it does work. There is no cancel=true because not all of the fields need to be completed. If you've got any suggestions on how to improve the code efficiency...
  8. D

    End If within End If

    I pretty sure I have got it working now. I just modified the code I had to start with and ended up with; If IsNull(Me.TxtCopy) Or IsNull(Me.TxtCost_Code) Then msg = "Please complete ALL of the details. Do you want to close without saving?" title = "Reprographics" result = MsgBox(msg, 52...
  9. D

    End If within End If

    Thanks for your help Brad, but it still isn't working :( Access doesn't like the second line of your code and highlights it in red. Whenever I press the close button, it highlights this line and produces a message box syaing "syntax error"
  10. D

    End If within End If

    Spoke too soon I though I had it sorted, but it's still playing up a bit. Here's the code I got so far: If IsNull(Me.TxtCopy) Or IsNull(Me.TxtCost_Code) Then msg = "Please complete ALL of the details. Do you want to close without saving?" title = "Reprographics" result =...
  11. D

    End If within End If

    Thanks for your input Wayne. You pointed me in the right direction and I've managed to get it sorted. Dave
  12. D

    Help! Access won't open form

    Try to open the code window by either using the icon at the top of the form, or View - Code. You'll need to have a form highlighted in order for these to be enabled. You can then view the code behind any form and check if there is some code on the FormLoad Event. Dave
  13. D

    End If within End If

    Hi Guys I'm trying (unsuccessfully) to create and End If statement within another End If statement. Here's what I've got so far. Private Sub CmdClose_Click() If IsNull(Me.TxtCompletion) Or IsNull(Me.TxtCopy) Then MsgBox "Please complete ALL of the details", vbExclamation Else...
  14. D

    Preventing Form Error

    great stuff Thanks Jay it works. I never thought about the form.error event. Dave
  15. D

    Preventing Form Error

    One quick question Hi guys I have a textbox on the form that allows the user to enter a date in the format dd/mm/yyyy. I've used an input mask to show the user how the date should be entered and it appears like this: __/__/____ This works ok, but only until the user enters the date in the...
  16. D

    A Calculated field on a form

    You could also try putting this code on the After Update event of the Pay Rate combo. Me.txt3rdField = Me.cboNumHrs * Me.cboPayRate It works for textfields, so it 'might' work for combos Dave
  17. D

    Don't shoot me just yet...

    requery??? It sounds like combo box B isn't being requeried. Try requering it on the After Update event. If you can't work it out, post the code and someone might be able to help. Dave
  18. D

    Arrrgh Decimal Places

    Hooray!!!! Thanks jaydwest and R. Hicks, it now works. I can see that R Hicks was correct from the beginning, it's just my extreme lack of SQL knowledge :o Thanks again Dave
  19. D

    Arrrgh Decimal Places

    I really appreciate your help Ricky, but unfortunately I'm going to need a bit more. The row source of my combo box now has the SQL string SELECT [TblPaper].[ID No], [TblPaper].[Paper Size], [TblPaper].[Paper Quality], [TblPaper].[Paper Type], [TblPaper].[Sales Price] Format£(TblPaper.[Sales...
  20. D

    Arrrgh Decimal Places

    Still no joy I'm using Win XP and Access 2000. I've tried entering the info from yourself and R Hicks in the Query Design Window and by generating the code myself abd it still doesn't work. I can't understand why it works when I run the query, but doesn't in the form.
Back
Top Bottom