Search results

  1. K

    Conditional Function

    Thanks. Apologise for the oversight. It is the following line where it stops with run time error 94, invalid use of Null. Tempdate2 = DateAdd("d", -182, dteBuilderComp)
  2. K

    Conditional Function

    Sorry to be back. I have modified the code a little to suit my requirements but I am constantly coming with 'invalid use of null error. Could you kindly see if this can be fixed. Dim Tempdate1 As Date Dim Tempdate2 As Date If strDivision = "Supermarket" Then If IsDate(dteSFStart) = True Then...
  3. K

    Conditional Function

    Thanks a lot for your help. I learnt a lot from this and will endeavour to work along these lines. Many thanks.
  4. K

    Conditional Function

    I am trying to construct a function but it seems little complicated. My attempt so far is as under. I have explained what I am trying to achieve. I guess it is only the last part is where I am stuck. Public Function PNPReturnReqDateTest(strDivision As String, strDevCode As String...
  5. K

    Sorting of a Column in the Continuous Form

    Thanks a lot.
  6. K

    Sorting of a Column in the Continuous Form

    I have a lot of records with blank priorities but a handfull have numbers in it. So my interest is to see numbers first ranging from 1 to whatever the last number followed by blanks. DESC works fine but not quite ASC.
  7. K

    Sorting of a Column in the Continuous Form

    Thank you for persevering with this. I am not having much luck. I tried the proposed change. Following is my SQL. Pl see if these can be amended in some ways. SELECT tblStores.StoreID, tblStores.Location, NZ([Priority],0) AS Expr1, Val(NZ([Priority],99999)) AS FPriority, tblProjects.Priority...
  8. K

    Copying Value of One field to the other

    Thanks. Tried the following statement. Still Type 13 error. PrevLocvar = Forms![frmRefCase]![frmRefCaseSF].Form![RelocStore].Column("Location") & ":" & Forms![frmRefCase]![frmRefCaseSF].Form![RelocStore].Column(0) I have column count 4, column widths as 0cm;5cm;1.505cm;1.752cm and bound...
  9. K

    Sorting of a Column in the Continuous Form

    Thanks one again. I removed square brackets and now I can run the query but the result is similar to the below. I thought we were getting a zero where there were no values. FPriority Priority 99999 99999 99999 4 4 99999 99999 99999
  10. K

    Sorting of a Column in the Continuous Form

    Thanks. Tried FPriority: Val(NZ([Priority, 999999])) but when run it returns Enter parameters doalogue box.
  11. K

    Sorting of a Column in the Continuous Form

    So you want me to add this additional field in the query on it own, have it sorted here. What is the correct format to have the field contents listed so that blanks or null are the bottom. I am using the following but then all zeros are the top. FPriority: Val(NZ([Priority]))
  12. K

    Sorting of a Column in the Continuous Form

    OK thanks. I created a seperate field and added to the underlying query. FPriority: NZ([Priority],999) Then I changed my statement as below. But still getting 999 in blank columns. Call SortForm(Me, "[FPriority]")
  13. K

    Sorting of a Column in the Continuous Form

    Thanks. I changed the syntax to the following but it does not quite do anything now. Call SortForm(Me, "NZ([Priority], 999)")
  14. K

    Sorting of a Column in the Continuous Form

    I got this code written by Allen Brown and it works great. But the only concern I have is that when I click the command button once (Call SortForm(Me, "[Priority]"), it sorts my values (priority expressed in numbers) in descending order fine but the ascending order shows blank rows first...
  15. K

    Copying Value of One field to the other

    Thanks. So what would be the corresponding change in the statement.
  16. K

    Copying Value of One field to the other

    Thanls a lot. I changed the code to the following after decalring a variable. Is that OK? PrevLocvar = Forms![frmRefCase]![frmRefCaseSF].Form![RelocStore].Column("Location") & ":" & Forms![frmRefCase]![frmRefCaseSF].Form![RelocStore].Column("LocNo") I am getting runtome error 13": Type...
  17. K

    Copying Value of One field to the other

    Generally it is quite simple to schieve with the following code. Me!PrevLocation = Forms![frmRefCase]![frmRefCaseSF].Form![RelocStore] However, there is a little twist. The relocStore is actually a drop down with a bound field to a numerical number with 4 columns. I like to copy the rest of...
  18. K

    Upgrading 2002 Databases to MS 2007

    Thanks a lot for your insights. I am inclined to keep DBs in their existing format but my only concern is (after opening a few DBs at home where I have Windows 7 and MS Office 2007) there may be a lot of errors with a such a large application as mine. I don't exactly remember errors which were...
  19. K

    Upgrading 2002 Databases to MS 2007

    I have some very well established DBs which are being used by a large number of users. Due to an impending upgrade to Office 2007, I have been asked to upgrade my systems as well. First question is can I continue using 2002 version dbs in Office 2007 environment? If not, and I might just...
  20. K

    SQL or a Query

    I am wondering which way it is better for a DB to perform. Whether to use sql in a report or a form or link to a query? Cheers
Back
Top Bottom