Search results

  1. M

    DLookup function in Query

    Hi Steve, Thanks for your help. I managed to get it to do what I wanted it to do. I tied myself up in a knot there for a while but with a clear head it took me a couple of minutes. Thanks again for your help.
  2. M

    DLookup function in Query

    Thanks Steve, I'll check this out now. I understand what you mean with the different measures - I've tried to make it fool proof and ensure all the data that is required is entered and not left blank. I'll have a look at what you've done. Thanks again
  3. M

    DLookup function in Query

    Hi Steve, Sorry for the delay. I have uploaded the DB with more forms included (Just trying to watch the size of the file when uploading). Start by opening the Navigation Form, then you can select any lodger and then from there select the Add New Rent Charge button. This is where I am trying...
  4. M

    DLookup function in Query

    Great Steve, thanks. The form is already setup to ensure the lodger's name is pulled in from the form which is open in the background.
  5. M

    DLookup function in Query

    I should also say that this is determined by the LodgerID which is on an open form
  6. M

    DLookup function in Query

    I'm stumped. What I want to achieve is the ability to add one week onto the last WeeklyRentCharge and pull in the corresponding RentAmount from the table WeeklyRentHistory based on the StartDate in WeeklyRentCharge being between EffectiveFrom and EffectiveTo or if the EffectiveTo is null, then...
  7. M

    DLookup function in Query

    Hi Steve, Thanks so much for this. I need to try and turn this into an append query which includes the code to generate the next week's date range and the amount you have got to work for me... Somehow I'm going to have to merge the code I had previously with the code you wrote so I can make...
  8. M

    Automatically adding new records based on date

    Hi Plog, I got half of what I want working. I am just trying to get the DLookup function to return the desired result. THanks for your help.
  9. M

    DLookup function in Query

    Hi, I have a table 'WeeklyRentHistory' that I want to search using DLookup to return an amount. The amount is determined by using the StartDate from the table 'WeeklyRentCharge' and comparing it to the EffectiveFrom and EffectiveTo dates in the 'WeeklyRentCharge' table. For example, I might...
  10. M

    Automatically adding new records based on date

    I have played around with basic append queries in the QBE window, but what sort of code would need to be behind it to compare the start date to current date and append the new record to the table?
  11. M

    Automatically adding new records based on date

    cheers, will give that a try
  12. M

    Automatically adding new records based on date

    I have a table with the tenant's details including start date, so it can be triggered from this date, at 7 day intervals. Another field stores the weekly rent, so I can pull that in when the new record it created.
  13. M

    Automatically adding new records based on date

    Hi, I am creating a database to keep track of rental payments. Somehow, I want to be able to automatically create a new record that will charge the tenant the weekly rent which is based on a start date. For example: Start Date = 01/01/2017 Rent = $200 per week On 01/01/2017, I would like to...
  14. M

    Running a sub on a newly opened form

    Thanks Grumm, that worked!
  15. M

    Running a sub on a newly opened form

    Hi Grumm, it is on the Lodgers form
  16. M

    Running a sub on a newly opened form

    I'll try and upload it again when I get home - just at work now. Thanks for checking it out.
  17. M

    Running a sub on a newly opened form

    Here you go
  18. M

    Running a sub on a newly opened form

    There are two ways I open the Payments form - the first is through a command button which runs VBA code; the second is via a macro that runs when I click a hyperlink when records are shown in a subform. The open args worked for the first way I open the form, but the second way had the same...
  19. M

    Running a sub on a newly opened form

    No good - can't seem to undo it now
  20. M

    Running a sub on a newly opened form

    FYI this is what I did In 'Lodgers' Private Sub cmdAddNewPayment_Click() DoCmd.OpenForm "Payments", acNormal, , , acFormAdd, acDialog, "Edit" End Sub In 'Payments' Private Sub Form_Open(Cancel As Integer) If Me.OpenArgs() = "Edit" Then cmdEditPayment_Click End If End Sub
Back
Top Bottom