User Profile

Collapse

Profile Sidebar

Collapse
istya
istya
Last Activity: Jun 6 '08, 09:01 AM
Joined: Aug 21 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • istya
    started a topic Refreshing or recreating a materialized view

    Refreshing or recreating a materialized view

    This is not a problem per say, just a debate topic. I can't seem to find anything that discusses this topic. This is in 10g

    Is it quicker and more efficient to refresh a materialized view or drop it and recreate it? For example, if you have a mv with a date in the definition, should you hard code the date in and change it everytime you recreate the mv or put sysdate in and refresh the mv?
    See more | Go to post

  • istya
    started a topic import data from .xls file

    import data from .xls file

    I am trying to import data from a 2000 excel spreadsheet, but I am having trouble with transferspreads heet.
    It tells me "Couldn't decrypt file"

    Can any point me in another direction please?
    See more | Go to post

  • istya
    started a topic help with dates

    help with dates

    Can you "add" a number of days to a date?

    I know you can use sysdate and do calculations like (sysdate-7), but can you do this on a date ie (01/01/08 -7)?
    See more | Go to post

  • if this is in VBA,
    Code:
    if nz(fieldB,"") = "" then
       msgbox("This field cannot be left blank")
    else
       if fieldB = 0 then
          msgbox("You are trying to divide by zero which is not allowed")
       else
          variable = fieldA/fieldB
       end if
    end if
    OR
    Code:
    if nz(fieldB,0) = 0 then
       msgbox("This field cannot
    ...
    See more | Go to post

    Leave a comment:


  • istya
    replied to Count IF help please
    Thanks for that, but I don't think I'm explaining myself terribly well.

    I have a table called 'partc' which holds about 20 numbers, i.e. scores on parking, toilets, lockers etc, per building. I want to workout the average of these score per building, but not include the zero values in the average.
    ie
    (sum of all scores / number of non zero scores) per building
    See more | Go to post

    Leave a comment:


  • There is a diffreence between null and 0. You should see if you are getting nulls or 0, if nulls, try changing them to 0, nz(value, value if null)

    Also, your problem may be dividing by 0 which will give an error....
    See more | Go to post

    Leave a comment:


  • istya
    started a topic Count IF help please

    Count IF help please

    Hi,

    I want to, if possible, create a query which counts the number of non zero entries in a table. I am aware that there is a DCOUNT in VBA, but atm I don't want to go down that route. Can anyone point me in the right direction please?

    Thanks
    See more | Go to post

  • istya
    started a topic Run-time error 3061

    Run-time error 3061

    I am having a dumb day to day. Can anyone have a schufty at my code and see why I am getting the runtime error 3061? I'm working on 2000 if that helps at all.

    Code:
    Dim dbs As DAO.Database
    Dim results As DAO.Recordset
    Set dbs = CurrentDb
    Set results = dbs.OpenRecordset("SELECT COUNT(*) FROM name_check;")
    MsgBox (results(0))
    'Set results = dbs.OpenRecordset("SELECT division FROM
    ...
    See more | Go to post

  • istya
    replied to form based on a query
    If you do the working around the command button rather than form_load where formname is the name of the form that you are trying to open and command_button is the name of you button

    Code:
    Private Sub [b]command_button[/b]_click()
    
    Dim dbs As DAO.Database
    Dim results As DAO.Recordset
    dim stdocname as string
    dim Dim stLinkCriteria As String
    
    Set dbs = CurrentDb
    Set results = dbs.OpenRecordset("SELECT
    ...
    See more | Go to post

    Leave a comment:


  • istya
    replied to form based on a query
    post your code and I'll have a look. Also, let me know if you want to open the form and then check or check than open the form if required.
    See more | Go to post

    Leave a comment:


  • istya
    replied to form based on a query
    What I suggest you do then is the code for the command button rather than the form_load() sub

    Code:
    Private Sub command_button_click()
    Dim dbs As DAO.Database
    Dim results As DAO.Recordset
    Set dbs = CurrentDb
    Set results = dbs.OpenRecordset("SELECT * FROM selcour;")
    If results.recordcount = 0 Then
    MsgBox ("There were no records to display")
    Else
    'open form
    ...
    See more | Go to post
    Last edited by istya; Sep 11 '07, 10:29 AM. Reason: grammer and spelling

    Leave a comment:


  • istya
    replied to form based on a query
    does it display the "There were no records to display" message or doesn't it get that far?
    See more | Go to post

    Leave a comment:


  • istya
    replied to form based on a query
    you want to use results.recordc ount rather than results(0) as you don't have count in the recordset sql string

    Code:
    If results.recordcount = 0 Then
       MsgBox ("There were no records to display")
    Else
       'open form
    End If
    See more | Go to post

    Leave a comment:


  • istya
    replied to form based on a query
    One other question - do you have Microsoft DAO ticked in your "Tools->References" in the VBA??

    I think I know what the problem is -

    Code:
        Dim dbs As DAO.Database
        Dim results As DAO.Recordset
    rather than
    Code:
        Dim dbs As DOA.Database
        Dim results As DOA.Recordset
    My mistake
    See more | Go to post

    Leave a comment:


  • istya
    replied to form based on a query
    Can you do me a favour and post the whole sub in and I'll see if I can find the problem.
    See more | Go to post

    Leave a comment:


  • istya
    replied to form based on a query
    Sorry, one thing I for to say, if you use "SELECT COUNT(*) FROM query;" then recordcount will ALWAYS be 1 as you have a result - its a value of 0, but it's a result. If you use the count function, you can use result(0) instead of results.recordc ount as results(0) will use the value returned by "SELECT COUNT(*) FROM query;"
    See more | Go to post

    Leave a comment:


  • istya
    replied to is there a way to force 2 digits month/day ?
    What date format are you using? In SQL I think you would need to format the date to have this work the way you expect.
    Is it the 11th Aug 07 > 10th Sept 07 or 8th Nov 07 > 9th Oct 07?

    I'm not sure what the function is for Access SQL but in ANSII standard it's
    Code:
    to_date(sysdate,'dd/mm/yyyy')
    See more | Go to post

    Leave a comment:


  • istya
    replied to form based on a query
    I had this problem, what you can do is
    Code:
    dim dbs as dao.database
    dim results as dao.recordset
    set dbs = currentdb
    set results = dbs.OpenRecordset("SELECT * FROM [B]query[/B];")
    if results.recordcount = 0 then
        msgbox("There were no records to display")
    else
        'open form
    end if
    where query is the query that you form is based on.
    If you put...
    See more | Go to post
    Last edited by istya; Sep 11 '07, 09:32 AM. Reason: clarity

    Leave a comment:


  • istya
    started a topic passing values from a form to a query

    passing values from a form to a query

    Hi,

    Can someone have a look at the below query point me in the right direction please? With the form flood_search open I get a popup box asking for [forms]![flood_search]![osapr] - any ideas?? It's in 2000 and the columns in the SELECT are just to shrink the amount of code

    Code:
    SELECT AddressPoint.columns, address_details.columns
    FROM addresspoint left JOIN Address_details ON address_details.OSAPR = AddressPoint.OSAPR
    ...
    See more | Go to post

  • istya
    replied to Report that is totals only
    Does it have to be a report? You could do something like
    Code:
    SELECT state, race, sum(vlaue to be totaled)
    FROM table
    GROUP BY state, race;
    Which would give you totals for each state and race but nothing else.
    See more | Go to post
    Last edited by istya; Sep 10 '07, 02:32 PM. Reason: missing code

    Leave a comment:

No activity results to display
Show More
Working...