Search results

  1. J

    How to stop Report On Close event from firing when No Data

    Hello again! I've tried two different approaches for the Dcount, first of all using the main table itself (TentCardPrinted is a Date/Time field): If DCount("[BkgRef]", "tblMain", "[TentCardPrinted]=Null") Then And then using a query that I have elsewhere in the system to show how many...
  2. J

    How to stop Report On Close event from firing when No Data

    Hi RuralGuy, thanks for the continued help! We're currently using this code, attached to the OnClick event of an open form: Private Sub btnPrint_Click() On Error GoTo Err_btnPrint_Click Dim stDocName1 As String Dim stDocName2 As String Dim vOption As Integer vOption =...
  3. J

    How to stop Report On Close event from firing when No Data

    Hi RuralGuy, and thanks again for the reply - unfortunately I'm still seeing the 'only available in an ADP' error, even though I've copied and pasted your code above in to the Close even of my report, as per the below: Private Sub Report_Close() Dim vResult As Integer If...
  4. J

    How to stop Report On Close event from firing when No Data

    Hi RuralGuy, Thanks for the response (and The_Doc_Man for the follow up), but can you advise in which procedure I should place this piece of code please? I placed this in the NoData procedure, as follows: Private Sub Report_NoData(Cancel As Integer) MsgBox "There are no records to...
  5. J

    How to stop Report On Close event from firing when No Data

    Hi guys, I'm sure this is an absurdly easy question to answer, but after plenty of Googling and searching in these forums, I can't find the answer that I'm looking for. It's been ages since I had to do any coding, so am a bit rusty! :banghead: Anyway, all I'm looking to do is stop the On...
  6. J

    Weird Type Mismatch error, only happens when executing code from On Click event.

    All sorted Minty, thanks for your assistance - works like a dream now, cheers! :) (changed it to Long, just in case...)
  7. J

    Weird Type Mismatch error, only happens when executing code from On Click event.

    Our Sales staff are good, but not that good!! ;)
  8. J

    Weird Type Mismatch error, only happens when executing code from On Click event.

    Okay, it's the following code that's causing the problem: Dim OrderCount As String And: If OrderCount > 9 Then Have changed the OrderCount variable to an Integer and this now works in a test environment. Will make the change live tomorrow and report back if it works! Thanks, Jeff.
  9. J

    Weird Type Mismatch error, only happens when executing code from On Click event.

    Coooooool, thanks Minty! I'll give it a bash and then report back!
  10. J

    Weird Type Mismatch error, only happens when executing code from On Click event.

    Hi guys, Bit of a weird (and long-winded) one this, but we have a module based in our (Access 2007) CRM system that allows our team in Production to view and acknowledge new orders as they're logged on the CRM by our Sales team. There's a number of functions in the module, but the one that...
  11. J

    Dim checkbox As String returns Type Mismatch?

    Hi guys, just to let you know that I've actually solved this in a rather arse about face sort of way...have got another field in the query that runs the form to set P1S to 'True' if Prod1stSend =-1 or 'False' if it isn't, then created a textbox with this field as its Control Source - then used...
  12. J

    Dim checkbox As String returns Type Mismatch?

    Hi llkhoutx, Thanks for the reply - sadly I'm still getting the same error, and this works when you step through the code, but not when automating via the OnLoad event.:banghead:
  13. J

    Dim checkbox As String returns Type Mismatch?

    Hi guys, Hopefully a really quick one from me, if y'all can help it would be mucho apprecianado (not a real word)! I'm using the OnLoad event of a form I've got as a placeholder to load a report from the onclick event of a button on my continuous form, and loading a chkbox into the code as a...
  14. J

    Filter not triggering on Form Open!

    Thanks for the reply Ranman, can you explain how to apply that logic to this problem please? To my understanding, this Where Condition is a criteria that we're using to open a form, and doesn't relate to a form object in this instance? Apologies if I'm misunderstanding your suggestion!
  15. J

    Filter not triggering on Form Open!

    Hi guys, Well, another week and another new problem from me!! As anyone who regularly views my posts will know, I'm dealing with a lot of 'inherited' databases that were created by my predecessor who, sometimes I feel, probably had less of an idea of what they were doing than me (although this...
  16. J

    How to pull one max date from the value in four different text boxes on cont. subform

    Shoji, apologies, one final piece of the puzzle - how do I show/hide this text box based on the value of another text box on the subform record, please?
  17. J

    How to pull one max date from the value in four different text boxes on cont. subform

    Shoji, you are a genius!! Thank you so much! I have tried this with lots of different combinations of the four fields being blank or filled in, and it works! Thanks everyone for your input!!!
  18. J

    How to pull one max date from the value in four different text boxes on cont. subform

    Hi Paul, Thanks for the offer - I've copied the Min/Max function into a new module in my database, and am thinking about loading the values of my date fields in to it via the OnCurrent event of the subform, but as Shoji has pointed out about the continuous nature of the sub, will this be the...
  19. J

    How to pull one max date from the value in four different text boxes on cont. subform

    Hey Shoji, Thanks for the suggestion - it's on the right track, but I have a couple of examples I am working on where we have a date in [Broadcast] and[Email1], [Email2] and [Email3] are empty, but the text box with your code above is showing "Not chased yet".
  20. J

    How to pull one max date from the value in four different text boxes on cont. subform

    Hi Paul, thanks for the suggestion - would you be able to help me put that all together, please?
Back
Top Bottom