Recent content by charlie442

  1. C

    Look for combinations of records in a field that Sum up to a Given Value

    Hi I found the answer. It is VBA for Excel but for those of you who are interested here it is: Option Explicit Function RealEqual(A, B, Optional Epsilon As Double = 0.00000001) RealEqual = Abs(A - B) <= Epsilon End Function Function ExtendRslt(CurrRslt, NewVal, Separator) If...
  2. C

    Look for combinations of records in a field that Sum up to a Given Value

    Hi I am looking for a piece of code (either in access or excel) which will return all combinations of records in a particular field (or column of cells) which will sum up to a given value (or a close approximation thereof - ie a margin of error of, say, 2). In other words, imagine you have a...
  3. C

    Calculating Interest Charges with Changing Rates

    Hi I am really stuck on how to do this. I am no vba expert but I took this project on thinking how hard can it be. Unfortunately it has totally flummoxed me :(. Essentially I have a table of historical interest rates (fields are : Interest_Rate, Rate_Start_Date and Rate_End_Date). Then I...
  4. C

    After cycling through records with form return to main form

    Thanks you sir! Works like a charm :D
  5. C

    After cycling through records with form return to main form

    Hi I have a form which allows team leaders to verify information that their team members have captured. It all works fine while they are verifying records and moving onto the next record, but when it gets to the last record it obvioulsy cant go on to the next record and the verifier gets...
  6. C

    Report with time brackets (some without data)

    Thank plog Sometimes the simplest solutions are the most elegant yet so damn hard to see. Much appreciated fella
  7. C

    Report with time brackets (some without data)

    Hi Here is my problem: I have written a query which brackets turnaround times. The brackets in days are : 0-1, 1-3, 3-5 and so on. This is done in a select query where a calculated field contains the brackets as above. I then run a crosstab query on this query making the brackets field the...
  8. C

    Login to direct user to relevant form

    Hi I got there in the end. I was going about it the wrong way. This is the solution. If DLookup("GroupID", "tblUser", "UserName = '" & [Forms]![frmLogin]![txtUserName] & "'") = 1 Then DoCmd.OpenForm "frmMainForm" End If Thanks for your help!
  9. C

    Login to direct user to relevant form

    Hey Thanks for that. I guess I could use If ...Else If Statements or Select Case Statements. However I am unsure what you mean by hardcoding the values. As people are lgging in and out of the database frequently it is the only way I know to keep track of who is doing what in the database.
  10. C

    Login to direct user to relevant form

    Hi The If Dlookup statements are what is highlighted and produce the error message I gave above? Ok so I have user permissioning active in this database. The UserID in the User table is used as a Temporary Variable which is added when a user logs in. There is a field in tblUser called...
  11. C

    Login to direct user to relevant form

    Hi Sorry the error message that comes up on the If DLookup statements is Run-time errror 438, Object does not suuport this property or method. Thanks
  12. C

    Login to direct user to relevant form

    Hi Here is the full code. It is creating errors on the dlookups to find the group id on the user ID. This has been commented out for now. Thanks Private Sub cmdLogin_Click() Dim bValid As Boolean bValid = False 'Check to make sure that username and password are not...
  13. C

    Login to direct user to relevant form

    Thanks Peter for the tip. However it is still giving me an error message. The UserID is a number so I am not sure it requires the single quotes. I am not sure that I have the whole syntax correct in the statement: "UserID = " & TempVars.UserID & "" Hmmm??
  14. C

    Login to direct user to relevant form

    Hello again gurus, In a login form I am trying to do a lookup on the user table and direct users to a specific form depending on their GroupID (User Group) in tblUser when they log in. The user ID is a TempVar that is added when a user logs in. Then I am trying to perform a dlookup for Group...
  15. C

    Combo box options dependant on value of another combo box

    Thanks mate. That is incredibly useful! :D
Back
Top Bottom