Search results

  1. R

    Trouble with DSum using date criteria

    Hello, Please ignore my last response. Your solution worked perfectly! I had previously tried the UK date format - Format([Transaction_Date], 'dd/mm/yyyy') - and it did not work. The US date format fixed it. Thanks a lot, Rudra
  2. R

    Trouble with DSum using date criteria

    Hello, Thanks for the reply. Yes tried that and it didn't work. Any other suggestions? Rudra
  3. R

    Trouble with DSum using date criteria

    Dear All, I have a query which includes a deposit field and a Transaction_Date field. I would like a cumulative deposit on each record (arranged according to date). The following is the expression I am using: =DSum("[Deposit]","[myQuery]","[Transaction_Date]<=#" & [Transaction_Date] &"#") I am...
  4. R

    Setting sub-report source object to a report in a collection

    Dear Chris, Thanks very much for your help. Rudra
  5. R

    Setting sub-report source object to a report in a collection

    Hello Chris, Thanks for the reply. There is no type mismatch any more but all the subreports display the same data whereas they should display different results depending on strKey. Is there any way for the subreports to display different instances of the same report? If this is not possible...
  6. R

    Setting sub-report source object to a report in a collection

    Dear Chris, With MsgBox mcolReportInstances.Item(strKey) I get the error Item mismatch. The code to create the collection is as follows: Option Compare Database Option Explicit Public mcolFormInstances As New Collection Public mcolReportInstances As New Collection Function...
  7. R

    Setting sub-report source object to a report in a collection

    Thank you both for your replies. Unfortunately, Cstr(i) does not seem to do the trick. I also tried the following: Me.Controls("Child" & CStr(i)).SourceObject = Reports(mcolReportInstances.Item(strKey)) but it gives me the same type mismatch error. In answer to your questions ChrisO, strKey...
  8. R

    Setting sub-report source object to a report in a collection

    Hello, I am trying to join a number of reports into one report. I have a generic report which displays a different dataset given the user's choice on a form. I created a collection where I can store multiple instances of this report (called mcolReportInstances) - this works just fine. I was...
  9. R

    passing open args to a new form class

    Thank you both very much. I shall try these solutions. Rudra
  10. R

    passing open args to a new form class

    Hello, I have a form to which I pass some OpenArgs and WhereCondition when I open it from another form. I am now trying to use multiple instances of the form. The code I am using is given below: Private mcolFormInstances As New Collection Function OpenFormInstance(FormName As String...
  11. R

    Find and validate last modified record

    Thanks for the reply. The point is, I have a number of fields per record. If I change any particular field value, then the Before/AfterUpdate event works fine. What I would like to do is check that all the data in a particular record are correct - this would be like a validation rule for not...
  12. R

    Find and validate last modified record

    Hello, I am trying to get an event to fire when I move to a new record. I would like this event to check the data validity/integrity of the record I have moved away from. I can do this by the OnCurrent event, but how do I locate the record that I have moved away from/modified? I am aware of...
  13. R

    How to pass Filter and OpenArgs to subform

    Hello, I have a form called frmBank to which I need to pass a Filter and OpenArgs. This works fine. I now have designed a parent form (frmData) where frmBank is a subform. How do I pass the OpenArgs from my parent form (frmData) to the subform? I find that the subform Open event fires before...
  14. R

    Force consecutive selection in muti-select list box

    Hello, I have a multi-select list box in one of my forms. I want to make sure the user selects consecutive items instead of non-consecutive items (e.g. 1-5 instead of 1, 4, 5). Essentially, for this list box, I would like the 'Shift' button to remain pressed (if you see what I mean). Is there...
  15. R

    Union Query Form

    Hello, I have a continuous form for which I have just changed the data source to be a UNION query. Previously, the control source for the form was one of my databases - now the control source should be the database from which the particular record was derived. Unfortunately, I find that I am...
  16. R

    Passing variable from form to module

    Hello, Thanks everyone, but I sorted it out by using the Call function. Merry Christmas, Rudra
  17. R

    Passing variable from form to module

    Hello, I have a form with a combo box (cboType_Selector). I need to pass the value of this box into another module to run a program to select the records specified in the combo box. The program runs fine if I keep both subs in the same module but I would like to keep them in separate modules...
  18. R

    Clear Error from textbox

    Taruz - Genius. Thanks. Worked like a charm. Brilliant.
  19. R

    Clear Error from textbox

    Sorry for the delay in replying vbaInet. All the boxes that should be empty are showing #Error. The data type for ID is autonumber and for Attachment_ID is number
  20. R

    Clear Error from textbox

    Thanks for the idea Missingling. Unfortunately, it did not work. I think the reason is that if the Attachment_ID field is blank, the lookup function goes to an empty record in the lookup table - new record - and returns a value which is #Error. I don't know how to get rid of this. I have...
Back
Top Bottom