User Profile

Collapse

Profile Sidebar

Collapse
Delerna
Delerna
Last Activity: May 27 '11, 03:52 AM
Joined: Jan 16 '08
Location: Sydney
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Actually going down to this level could be best left to the people we are trying to help to discover for themselves, unless they ask for it directly.
    It could be even more confusing for someone who doesn't have enough knowledge to understand it?
    See more | Go to post

    Leave a comment:


  • Well if we are going to that level of detail :)

    I thought VBA was an interpreted language and not a compiled one.
    In that case each instruction, immediately prior to execution is interpreted and both true and false conditions are determined immediately prior to the codes execution.
    In effect, VBA's process of executing an instruction causes both versions of the truth to be calculated and therefore the error to be ge...
    See more | Go to post

    Leave a comment:


  • Delerna
    replied to Access 2007... Merge two tables
    This will only work if each company never has more than one sec,pres or dir

    If they do then the subquery route would possibly be easier
    See more | Go to post

    Leave a comment:


  • Delerna
    replied to Access 2007... Merge two tables
    oops, forgot to remove the total column
    Here is revised crosstab
    [code=sql]
    TRANSFORM First(qryCorpor ationOfficers.N ame) AS FirstOfName
    SELECT qryCorporationO fficers.corpnam e,
    qryCorporationO fficers.address
    FROM qryCorporationO fficers
    GROUP BY qryCorporationO fficers.corpnam e,
    qryCorporationO fficers.address
    PIVOT qryCorporationO fficers.type;

    [/code]
    See more | Go to post

    Leave a comment:


  • Delerna
    replied to Access 2007... Merge two tables
    Just to verify what as Rabbit says
    crosstab is the easiest

    I did a mockup db of your data

    First you need a query to combine the 2 tables for the crosstab
    [code=sql]
    SELECT corporations.co rpname,
    corporations.ad dress,
    officers.type,
    [fname] & ' ' & [lname] AS Name
    FROM corporations
    INNER JOIN officers ON
    corporations.co rpnumber =officers.corpn umber;...
    See more | Go to post

    Leave a comment:


  • corrected code
    [code=sql]
    iif(H9='' or G9='',0,iif(H9< G9,(H9-G9)*24 +24,(H9-G9)*24))
    [/code]


    [code=vba]
    if H9="" or G9="" then
    result=0
    else
    iif H9<G9 then
    result=(H9-G9)*24 +24
    else
    result=(H9-G9)*24)
    end if
    end if
    [/code]



    and

    ...
    See more | Go to post

    Leave a comment:


  • oops.......egg on face.
    See more | Go to post

    Leave a comment:


  • Oh I just noticed



    But as poted above
    I made no comment about excel vba.
    My answers were relating to the OP's excel formula and gave versions for both cases in ACCESS alone.
    within a query and within VBA...
    See more | Go to post

    Leave a comment:


  • Hi Neopa
    I must admit I had always made the assumption that what I said was correct and after reading your post I had doubts so I fired up Access and Excel and Checked

    I am sorry but I fail to see where what I said is not correct.

    In my trial
    IN EXCEL
    iif(condition,t rue,false)
    cannot be used in a cells formula.
    Neither can it be used in VBA.
    If condition then true else fales...
    See more | Go to post

    Leave a comment:


  • Just some words of encouragement

    There are many ways to do what you require.
    Which way is best depends largely on the particulars of what you are doing.
    What works in one scenario may not in another.

    It is up to you as the developer to make that choice based on your experience, your knowledge and maybe some guidance from sites such as this.

    Ultimately, you can only work with what you know....
    See more | Go to post

    Leave a comment:


  • You can reference the contents of any control on an open form from your query in the criteria for the field in design mode of the query editor.

    Use
    Forms!FormName. ControlName


    Hope that helps
    See more | Go to post

    Leave a comment:


  • Delerna
    replied to How to assign work to multiple users?
    What have you tried?

    What if 2 of the 4 workers try to grab 50 jobs at the same time? and they each finish up grabbing some of the same jobs?
    You need to take that into consideration
    Or is that what you are asking for help on?
    See more | Go to post

    Leave a comment:


  • There is no reason why the the database won't run over a wireless network that I can think of. I think there is some other reason why it's not running on your clients computer.

    To prove that, try connecting the clients computer to a wired network and if the db still doesn't work then it is not the wireless network.

    What does "doesnt work properly" mean anyway?
    I took it to mean that it is not working...
    See more | Go to post

    Leave a comment:


  • If in vba
    excels
    if(condition,tr ue,false)
    in access is

    if condition then
    true statements
    else
    false statements
    end if

    so
    [code=vba]
    if H9="" or G9="" then
    &#48;
    else
    iif H9<G9 then
    (H9-G9)*24 +24
    else
    (H9-G9)*24)
    end if
    end if
    [/code]
    See more | Go to post
    Last edited by Frinavale; Nov 1 '12, 07:23 PM. Reason: Fixed the 0 problem

    Leave a comment:


  • If you mean in a query then
    excels
    if(condition,tr ue,false)
    in access is
    iif(condition,t rue,false)


    so basically take you formula
    change if to iif
    change the cell references to field references
    change the or part to (H9="" or G9="")

    and your done

    something like this (untested)
    [code=sql]
    iif(H9=""...
    See more | Go to post

    Leave a comment:


  • Try this
    [code=vba]
    strSQL = "UPDATE [TblPatientDemog raphics] " _
    & "SET [RefPhysicianID] =" & Me.LbxPhysician SearchResults & " " _
    & "WHERE ([PtID] = " & [Forms]![FrmPatientDemog raphics].[PtID]
    [/code]
    See more | Go to post

    Leave a comment:


  • it should be more like this I think
    Code:
    Private Sub Command2_Click()
       dim StartDate  As Date,EndDate  As Date,PctChange As Single
       StartDate = [Forms]![Bond Price Exception 1].[start_date]
       EndDate  = [Forms]![Bond Price Exception 1].[end_date]
       PctChange = [Forms]![Bond Proce Exception 1].[trigger]
    
       Call BondPriceException(StartDate, EndDate,PctChange)
    End Sub
    See more | Go to post

    Leave a comment:


  • Similar to post 12



    Is there a form that is open all the time.
    You could use the forms timer event to run the query.
    Haven't done any access programming in a while.
    Someone will come up with a better way



    From the sound of things it is now becoming apparent that it might have been easier if the form where the users enter the action log should be automatically updating...
    See more | Go to post

    Leave a comment:


  • Actually, seeing as it's a live database
    The best thing to do would be to import the table and its data into another database and develop the update query there.



    PS
    Susan....have I instilled a healthy fear of developing and running unproven update queries on live data in you yet ? :)

    I hope so, it is dangerous to become blaze about developing update queries on the fly with live data.;...
    See more | Go to post

    Leave a comment:


  • changes are bold and underlined
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...