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...
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...
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...
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...
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...
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!
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.
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...
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...
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??
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...