User Profile
Collapse
-
Thanks Rabbit.... -
Thanks,
I have looked at this site before, and found it helpful, but I think I need more inforomation....Leave a comment:
-
Good VBA for Access instruction book?
Hello Everyone,
I am trying to teach myself a little more about VBA for Access, can anyone recommend a good book for this. (At this point I've read Access VBA Programming for dummies, but I didn't find it very useful).
Thanks, -
Hey Rabbit,
Thanks for your help. I don't want you to think I am ignoring your response. I am currently trying to learn more about VBA, because I just don't know enough. I have picked up the basics, or at least some of them, but it isn't enough. Do you have any advice about what a good book to learn VBA is?
Thanks...Leave a comment:
-
Hello Rabbit,
I'm not sure I understand; if the function can't see the fields of the query, how do I refer to the calculations done by the previous function?
I'm also unclear about what the structure of FunctionName = Calculation
Here is what I have:
...Code:Public Sub Salary(Salary As Currency, BudgetID As Integer, MainID As Integer, Spread As String)= Calculation
Leave a comment:
-
Hello Rabbit,
I think that I have made the appropriate changes to the variables and function. However, I am still getting the same compile error expected expression message. It highlights the divisor mark after [ESalary]; is that not how division should be expressed?
...Code:If Number = 1 Or 3 Then [ESalary]/9*1*[AY Percent]+[Salary]/9*Val(Mid([Spread],4,1))*[Summer Percent]+[Salary]/9*Val(Mid([Spread],7,1))*1.034*[AYLeave a comment:
-
Hello Rabbit,
I guess that I thought that since it had been defined as a variable in your previous code, I wouldn't need to define MainID, BudgetID or NameID.
Can I call CalcSalary from the previous code? Can I call Spread from the query?
Thanks....Leave a comment:
-
Thanks Rabbit,
I appreciate the help. I have started trying to write the code, but I realized that I don't know how to refer to the calculations done in the previous code. I tried using a modification of the query, but that wasn't acceptable (I get a compilation error "expected expression". Here is what I have so far:
...Code:Public Sub Salary(Salary As Currency, Spread As String) Dim
Leave a comment:
-
Hi Rabbit,
Not a problem. You have no obligation to respond to anything I or anyone else posts, and while I am always grateful, (very grateful) for the help you provide, I completely understand that.
I did try to combine all my queries into one, but I must have done something wrong, because it created an entry for every record. What I did was to take the expressions from the queries and add them into this new query where...Leave a comment:
-
Hello Rabbit,
I have been trying to come up with a solution for how to open a form when a certain item in the combo box is selected. I wrote a private sub, but it doesn't work:
Can you help me determine what...Code:Private Sub Combo12_Click() If [Combo12] = "GRA" Then DoCmd.OpenForm "Class7", acNormal, , , acFormAdd End If End Sub
Leave a comment:
-
Hi Rabbit,
I think I understand what you are saying about the query that gathers information; I have created most of them at this point. What I'm not quite sure I understand is how I filter for a specific budget. Can you tell me a little more about that? Also, for the report, can I pull from more then one query? Right now I have created multiple queries, because that seemed the easiest way to create a criteria. For example, I used...Leave a comment:
-
Conditional Form Opening & Report Filtering
Hey Rabbit,
Thanks for all of your help. I really feel like this thing is starting to come together. It's very exciting.
There are still a few things that I would like the form to do that I don't know how to structure. If you could give me some help, I would appreciate it.
When I select one specific employee type, I want that to open another subform. I'm assuming that this will be something under the... -
-
Hi Rabbit,
I'm sorry I didn't explain that very well. What I meant by "full spread", was that it would return results as though there were always full months for both AY and Summer. For example, If you had a start date of 3/1/2007, and 9 AY months, and 3 summer months, the spread would be 3,1,6,2,0,0. But if there were say 2 AY months and 2 summer months, the new spread would be 0,0,2,2,0,0 (which would be...Leave a comment:
-
Hi Rabbit,
Yeah, I always feel better when I can figure something out on my own as well.
I've been trying to figure this one out as well, but so far I haven't come up with it. Is there an easy modification that I can make to the VBA code so that it will always calculate the full spread regardless of the number of AY and summer months. This would run as a separate module with a different name.
This wouldn't...Leave a comment:
-
Hi Rabbit,
I figured out what I was doing wrong. I had attached the subform to the wrong field of the main form; it needed to be with [Budget ID]. I also realized why I wasn't able to display the % fields; I chose the wrong field size. I should have chosen double.
Thanks....Leave a comment:
-
Hello Rabbit,
Thanks for your advice. It took me a little while, but I was able to eventually isolate the problem. It turned out that I was using the wrong spread; it should have been 1,4,7,10 etc... It just happened that my S2 and AY2 were the same number, so it looked right, even though it was pulling from the wrong place.
I am trying to turn my focus back to the forms. We had discussed this previously, but I'm still...Leave a comment:
-
Calculated Field Returning Incorrect Results
Thanks NeoPa for your help and explanation. I learn a little more each time.
I have a new problem that I don't understand. I used what was provided to design a query, and I tested it out with type 1 employees, and the numbers matched my expectations:
...Code:Salary1: [Salary]/9*Val(Mid([Spread],1,1))*[AY Percent]+[Salary]/9*Val(Mid([Spread],3,1))*[Summer Percent]+[Salary]/9*Val(Mid([Spread],5,1))*1.034*[AY Percent]+[Salary]/9*Val(Mid([Spread],7,1))*1.034*[Summer
-
Hello Rabbit,
So if I am understanding this correctly you are saying that the spaces also count, so it would go something like 1,3,5,7 etc...; correct?
Also in terms of surrounding a function can I put the Val() function only at the beginning:
...Code:Val([Salary]/9*Mid(Spread,1,1) + [Salary]/9*Mid(Spread,3,1) + [Salary]/9*Mid(Spread,5,1)*1.034 +[Salary]/9*Mid(Spread,7,1)*1.034 + [Salary]/9*Mid(Spread,9,1)*1.034*1.034
Leave a comment:
-
Hi Rabbit,
So to find the salary for a category 1 employee could I create a query with a criteria of 1 for that field, and then an expression something like:
?Code:[Salary]/9*Mid(Spread,1,1) + [Salary]/9*Mid(Spread,2,1) + [Salary]/9*Mid(Spread,3,1)*1.034 +[Salary]/9*Mid(Spread,4,1)*1.034 + [Salary]/9*Mid(Spread,5,1)*1.034*1.034 + [Salary]/9*Mid(Spread,6,1)*1.034*1.034
Thanks....Leave a comment:
No activity results to display
Show More
Leave a comment: