Recent content by james7705

  1. J

    Solved ShowHideControls

    thank you...that worked perfectly
  2. J

    Solved ShowHideControls

    Hi Gasman Here is the complete module that I am using. The idea is for it to lock the database from unauthorised tampering? The error seems to highlight on row 24 "Dim db As Database, prop As Property" giving me a compile error. Option Compare Database Option Explicit #If VBA7 Then Public...
  3. J

    Solved ShowHideControls

    Hi all I found this piece of code on a login form that I am using on my database. The issue I have is when I compile it, it gives me a compile error: "Expected user-defined type, not object" How do I fix this? Public Function SetProperties(PropName As String, PropType As Variant, PropValue...
  4. J

    Solved Managing times in a database

    Thanks for all the advice... I have managed to create working functions for what I have in mind
  5. J

    Solved Managing times in a database

    Hi Pat Is it possible for you to assist me with the code...I have no idea how to even start as the current format I am using is on an excel spreadsheet with a bunch of statements in the formula bar that does all the calculations for me. The problem with this is that I have a ton of excel forms...
  6. J

    Solved Managing times in a database

    Ok...simple enough... Now the question is...what do I use? I tried if statements, but that doesn't work...too many variables
  7. J

    Solved Managing times in a database

    So I should split that table into a new table containing only the calculated times? And it will relate to the tblWorkingHours table I assume?
  8. J

    Solved Managing times in a database

    Good day... I am hoping someone can assist or point me in a direction with regards to managing times in a database. Allow me to explain... I have 3x tables... tblHolidays which contains "HolidaysID", "HolidayName" and "HolidayDate" tblEmployees which contains "EmployeesID", "EmployeeName" and...
  9. J

    Cascading combo on sub form

    yea i was trying different ways with the subforms to see which would work the best. i will be using the form exactly as it is except that i will remove one of the subforms. the idea is to input the work details and then the items used for that particular work. the dlookup needs to refer back to...
  10. J

    Cascading combo on sub form

    thanks for the help Gasman...looking at it...it makes more sense now...having to refer to both forms. thank you. would it be possible for you to pop in a little dlookup on the PLU section of the subform? i'm not 100% sure how that would work on a form or subform. in other words...when i select...
  11. J

    Cascading combo on sub form

    the issue is not the main form. both subforms have combo boxes. the 1st one...department works fine the 2nd one...description should get info from 1st one, but doesnt. if you create a new record on main form and the scroll down to any of the 2 sub forms, it allows you to select department, but...
  12. J

    Cascading combo on sub form

    Good day I have attached a sample of my database here. the problem I am having is I have 2 combo boxes on my form which works perfectly. When I attach that form to another form as a subform, everything falls apart. I have tried to create a subform in datasheet and it doesnt work. I then tried to...
  13. J

    Creating variables to calculate

    I have attached the database that im working on to this post. When you open it...it asks for a meter reading and a date. When you click calculate it will open the second form where all the info is being calculated. You will notice there are 5 empty blocks (tariff1 to tariff5) where the...
  14. J

    Creating variables to calculate

    Thanks Ranman256 Have you looked at the text file i attached? I used an IF and ELSE statement with the tariffs as variables. Is there a way i can do that with VBA as it seems a lot simpler? I don't know VBA at all so not sure how to assign the variables and input that in the IF statement
  15. J

    Creating variables to calculate

    Good day all I'm really hoping someone can assist me. I'm trying to create a calculator using different sets of tariffs. Basically what happens is i will enter an amount of units consumed. What the calculator needs to do at the push of a button is calculate the amount owed by breaking the...
Top Bottom