Search results

  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
  16. C

    Combo box options dependant on value of another combo box

    Hi gurus I have a form in which I have two combo boxes. The first selects tax type and the second selects query type. Different tax types have their own unique list of query types as per the Tbl_Query_Types. I want the 2nd combo box to only show selections available relating to the tax type...
  17. C

    Problem setting default value - referencing issue

    Hey I have successfully manged to do what I set out to do. Thank you both for your help - it is really appreciated Charlie
  18. C

    Problem setting default value - referencing issue

    Thanks guys for your assistance, Let me try and explain myself in a better fashion. I quite agree that storing this calculation in a table is a bad idea. However is it possible to store just the result of the calculation in the table. This would allow me to track progress better. Built into...
  19. C

    Problem setting default value - referencing issue

    Thanks Bob Right basically I am working on a timeline for projects. Each project will have various steps along the way which will all be granted the same length of time (or work days) to complete, but begin at differing dates throughtout the year. The function goes like this #Returned Date# =...
  20. C

    Problem setting default value - referencing issue

    Thanks, This seemed to work initially, However when I linked the form to the Table Record Source, and the control to the control source field (this is a date field in the underlying table) then it seems to go on the blink again. Would you know how this is caused?
Back
Top Bottom