Search results

  1. Z

    Simple if statement not evaluating

    Good old Nz seems to have done the trick. Thanks! Access is strange animal.
  2. Z

    Simple if statement not evaluating

    Just did as suggested: cboRegion.value = "" cboRegion.value = " " me.cboregion = null me.cboregion = "" me.cboregion.value = null me.cboregion.value = "" All make no difference. I'm checking the value of the cbo in the code and it's showing as null, so by rights it should enter the first...
  3. Z

    Simple if statement not evaluating

    I've got a very simple if statement set up around a recordset / query displayer. It is meant to check if a certain cbobox is blank. If so, then error and exit the sub, else compile the query and execute. For some reason though, it's acting as if the if statement doesn't exist and runs the query...
  4. Z

    Help with recordset in a function

    I knew I had seen the = nothing before but never knew way will implement that. Thanks! I've now got the function working more or less how I want. The problem is, it's still taking around 6 minutes to run this query. I was hoping that someone would be able to see if my code could be tweaked to...
  5. Z

    Help with recordset in a function

    Changes noted and made, thanks :) I've been working on it and have got it working well, it seems. I'm still working out bugs but I'm quite proud that I got this working with rSets so quickly, thanks to AP.co.uk and Google of course :) Do I need to close the recordset at the end of the function?
  6. Z

    Calculating a number using values from an offset record

    This one was a pickle but I ended up solving it pretty easily with dlookup: DelayedAmount = Nz(DLookup("" & eco_gross & "", "tblRecords", "[WeekID]=" & DelayedWeek & " And [PartnersetID]=" & pid), 0) Problem is, it's very slow.
  7. Z

    Help with recordset in a function

    Hi all, I've built a small(ish) function that I referred to in another thread, here. It currently uses Dlookup, which is simple but far too slow. I'm trying to convert it to use Recordsets and being completely new to their use, I've come up with the below. Function get_invoiced_test(hosted...
  8. Z

    Calculating a number using values from an offset record

    Hi everyone, I'm writing a small function that will be used to calculate some revenue numbers based on a few conditions. One of the conditions is a delay period, in weeks. It's stored in a table, but let's say it will be 4. I want my function to take a number from the current record, Number...
  9. Z

    Objects menu totally gone

    Hi all, Stangest problem happened today, I went to open up our database, which automatically opens a UI form. Holding shift to bypass this normally shows the objects window, but today it was gone. All that was left was a neverending scrollbar at the bottom. I've looked around for a solution...
  10. Z

    Append query: from start to end week

    Tell me about it, he's got his head in the clouds and wants to implement every bloody feature under the sun regardless of how inefficient, time-consuming or useless it is. Thanks.
  11. Z

    Field values as columns ala Excel

    I thought of that, but does that allow data entry also? This item will be used for longer term revenue planning so data needs to be entered.
  12. Z

    Field values as columns ala Excel

    Hi all, I have a small problem here that I don't know how to tackle. Imagine your generic monthly revenue report in excel. You have the days of the month as columns and the values like gross revenue, net revenue, profit etc as rows. I want to replicate this in Access using a table field week...
  13. Z

    Conditional formatting as "expression is"

    Great! thanks for the above, it triggered in my mind that the data was a remnant from another function where I copied the format command from. The below works perfectly: [WeekID]>=Format(Now(),"ww",0,0)
  14. Z

    Conditional formatting as "expression is"

    Hey all, I'm trying to change the forecolor of control A on a subform based on the value of another control B on the same subform. The subform displays as a datasheet. Here's what I've got in control A's conditional formatting box: [Control B]>=(Format([Date],"ww",0,0)) Control B...
  15. Z

    Append query: from start to end week

    Thanks guys, as far as bad design goes, tell my boss that. As much as I'd like to do it my way, I can't :) The records need to be created all at once and empty so that revenue forecasting data can be imported into them - so not really empty. The above is just what you helped me with before...
  16. Z

    Append query: from start to end week

    Hi all, been a while since I asked for help but it's that time again! I working on an append query. The query is creating a record in tblRecords for each combination of Partner, Week and Genre. So if we had Partners A, B and C who use Genres 1 and 2 and we have 52 weeks, that would result in...
  17. Z

    Listbox check loop won't work!

    So simple when you know how :) Above .count = 0 was just what I needed, works great. Thanks!
  18. Z

    Listbox check loop won't work!

    Thanks Bob, so within the for loop I could put a condition to Exit For based on ItemsSelected? It's pretty close to what I have, I'll give it a try though.
  19. Z

    Listbox check loop won't work!

    Hey all, I'm trying to make a simple procedure that will check if any items in a given listbox have been selected and if so, continue, otherwise give an error. Here's what I've got: For i = 0 To lstChannel.ListCount - 1 If lstChannel.Selected(i) Then Exit For Else MsgBox...
  20. Z

    Design problem, two ways to enter data

    Ended up using DLOOKUP to grab the shares based on the partnerID. These were then used to calculate the revenues on the AfterUpdate event of the original revenue field, with a condition to check if there was already data in the secondary fields. Percentages are also looked up in the Current...
Back
Top Bottom