Search results

  1. M

    Calculating Fiscal Years

    Hi, I have the following function: Function GetFiscalYear(ByVal x As Variant) If x < DateSerial(Year(x), FMonthStart, FDayStart) Then GetFiscalYear = Year(x) - FYearOffset - 1 Else GetFiscalYear = Year(x) - FYearOffset End If End Function I call on the...
  2. M

    List Box

    I'm not really sure what the SQL statment does in your code. I just want to be able to select multiple plant locations from the list box form, then send those to my query ShortCode_byPlant and have it produce the query in datasheet view with only the plants I've selected and other data...
  3. M

    List Box

    Whew. That's a lot of code. I tried to plug in my variables in place of yours. But it didn't produce any results, not even an error. I've highlighted the parts I've changed. The variables I had were: PlantList which is the name of my list box and ShortCode_byPlant is the name of my query...
  4. M

    List Box

    Hi, I want to be able to select multiple values from a form and then run a query from those values. I read through some posts and learned I cannot use a combo box, that I have to use a list box. I have no idea what to do next besides create the list box. I have a table of Plants that I want...
  5. M

    dlookup

    Hi, I am trying to use a dlookup to return the price of an item that meets two criteria. This is what I came up with, but it doesn't work. The part after the AND works by itself, but when I combine the two I either get a #Error or no values that meet the criteria. Any suggestions? I can...
  6. M

    Grabbing numbers from within a text

    Yay, it did! Thank you! :)
  7. M

    Grabbing numbers from within a text

    Thanks for the NZ tip... where does it go? (cint(left(Nz([Product], '0'), 6)))*1000 ?
  8. M

    Grabbing numbers from within a text

    I thought it worked. But then my query said "Invalid Use of Null" I'm not sure why... I eliminated other possible causes of the Null and came up with CInt function as causing the error message. I forgot to mention some of the Product values are Blank. Would that cause CInt to error?
  9. M

    Grabbing numbers from within a text

    Hi, I have a table with a field, [Product]. The Product data comes in the form, # Description. Examples: 00100 Strawberry, 001234 Kiwi, 012345 Apple The info I want to pull from that field is the 100, 1234 and 12345, then I want to add on three 000 at the end, so the final result is 100000...
  10. M

    Dlookup criteria

    Hi, I have a reference table that has a Division field and a Item field which lists all possible items I sell and what division they fall into. example below: Div Item Cars 100 Cars 101 Bikes 200 Bikes 201 I have another table that has the item sold [ItemNo], quantity...
  11. M

    determine if text or numeric value using Iif

    Thanks! It seems so obvious once you've told me! :)
  12. M

    determine if text or numeric value using Iif

    Hi, I have a field that has data in the format of ##LLLNLL. ex) 08NOV7NY I call on that field in a query and try to pull out the last two letters for the location. So I use the code, Location: Right([Code], 2) and that seems to work. However sometimes the user just puts the date in...
  13. M

    Iif statment to evaluate ending in zero

    Thanks a bunch. That worked perfect.
  14. M

    Iif statment to evaluate ending in zero

    Hi, I have a field called [Item] that I am pulling from a linked Excel table where multiple people are entering data over multiple years. The Item is a string of numbers of varying lengths and values. ex) 636, 188880921 I call on [Item] in a query --> [ItemNo]:[Item] & "000" and add three...
  15. M

    Date Format in Query

    date format in query I got it! Thanks for the advice. I used the following code just in case people were curious: Expr1: Format(Left([Tag],2) & "/" & Mid([Tag],3,3) & "/200" & Mid([Tag],6,1),"mm/dd/yyyy") and that returned 10/29/2007 Thanks again!
  16. M

    Date Format in Query

    Hi, I have a query in which I am pulling from another table. On the table I have a field called Tag, which consists of data in the form of a combo date/place. Ex) 29OCT7NY date = 10/29/2007; place = NY When I call on the Tag field in my query, I only want the date portion. So, I used the...
Back
Top Bottom