Hi Skip,
Thanks for the response. I had tried playing with the INDIRECT function but I couldn't figure out the logic. Just now I had an idea to make a cell with the range as the text (e.g. cell W2 is ="'Costs - " & TEXT(D2,"mmmm") &"'!A2:C20") and then I have the formula as...
I'm wondering if there's any way to decide which sheet to reference based on a formula.
Specifically, I have data for sales in sheet 'All Sales'. Then, I have a sheet outlining cost assumptions for each month. They all have identical format, and the sheet names are 'Costs - January', 'Costs -...
I'm looking to run an update query in MS Access that will take an existing Date/Time field and add one year to it. I was looking at the DateSerial function but I believe that would get rid of the times and I need those to stay the same. Any thoughts?
Sure. Make a new table with:
Currency
CurrencyinGBP
Then in the query, join the Currency fields and make one of your query fields:
PriceinGBP: [CurrencyinGPB] * [SellingPrice]
In the new table, your entries would be like:
Currency CurrencyinGBP
EURO 0.6998
GBP 1
USD...
Looks like your numbers are stored as text, not numbers. Either change the field data type or use Val([Organization]) instead of just [Organization].
Also, you don't need to show the numbers. Just have the report sort by them. They won't show up anywhere unless you place them on the actual...
I'm not sure exactly what you're trying to do.
Do you want to use the ticket number to do something directly after the record is created? Or do you want to go back and get it later?
What are you going to be doing with the ticket number?
Dim choice as Integer
choice = MsgBox("This will delete the company record. Are you sure?", vbYesNo)
If choice = vbYes Then
'user said yes, code here
ElseIf choice = vbNo Then
'user said no, code here
End If
Put that if statement inside the "If intResponse = vbYes" block. And no, you can never have too many if statements.
Your code should work fine if you lay it out like this:
If Me.cboStatus.Value = "Approved" Then
...code...
ElseIf Me.cboStatus.Value = "In Process" Then
...code...
First, you're missing an "End If" at the end of the procedure.
Second, the problem is this line:
cboInput = intResponse
intResponse = 1 (vbOK) or 2 (vbCancel), which are both interpreted as True. So, replace this code:
cboInput = intResponse
If cboInput = 1 Then
With this:
If...
IIf(([Empl2Name]<>[EmployeeN]) Or ([CaseC]=-1) And ([Empl2Name]=True), [Empl2Name], IIf(([EmployeeN]=True) And ([Empl2Name] Is Null) And ([CaseC]=-1),[EmployeeN],Null))
Make a new field for the day:
DayofMonth: Day([DateField])
Then, in the criteria box, put in the number of the day you want to filter for. If you don't want to see the day number you can un-check the "Show" box.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.