User Profile

Collapse

Profile Sidebar

Collapse
elainenguyen
elainenguyen
Last Activity: Jul 7 '10, 05:48 PM
Joined: Oct 5 '06
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • elainenguyen
    replied to Form "ReadOnly"
    thanks for your help. Is there a way to do ViewOnly instead of ReadOnly?
    thanks!

    elaine
    See more | Go to post

    Leave a comment:


  • elainenguyen
    started a topic Form "ReadOnly"

    Form "ReadOnly"

    Hi,
    since assigned "acFormReadOnly ", my code supposes to allow user to only "read the form", but when I test the code, I can type and click on any of the fields on the form. What I really want the code to do is not allow user to be able to click or type on any of the fields, on the form. Any idea? please help.

    Code:
      
    Dim db As Database
        Dim rst As Recordset
        Dim stLinkCriteria As String
    ...
    See more | Go to post

  • Hi,
    thanks for you help. The count is correct this time.
    How do I add an additional count into the code for field Ulcer=1 into the same query? For example:

    Test Data:
    Code:
    RecID   Cus#   Hypotension   Ulcer
    9       111               0              0
    3       111               1              1   
    8       222               0              0
    7       222               0              1
    ...
    See more | Go to post

    Leave a comment:


  • Hi,
    what I really want to do is actually "count" not "sum".
    For example, in my table, there are 3 fields, field 1 is RecID, field 2 is cust#, field 3 is "hypotensio n with either 1=Y or 2=No.

    RecID 1 (auto num), cust#5, hypotension =1
    RecID 2 (auto num), cust#5, hypotension =1
    RecID 3 (auto num), cust#6, hypotension =1

    instead of counting the total number of Y for...
    See more | Go to post

    Leave a comment:


  • thanks for you help, I've tried the code with about 2 fields and it doesn't work. The counting is not correct.

    thanks!
    See more | Go to post

    Leave a comment:


  • How to not count repeated record with the same ID

    Hi,
    I am trying create a query that counts all records which have the field Hypotension=1 (which is Yes), but I only want to count the same customer once.
    For example:
    My table has 3 fields: RecID (primary key), MRN, and Hypotension

    RecID Cus# Hypotension
    1 222 1
    2 222 1
    3 111 1

    ...
    See more | Go to post

  • elainenguyen
    replied to IFElse Statement
    Thanks for everyone's help. After playing with the code, I've found the way to make it work. Belows is the correct code. I just need to change it from OR to AND.
    thanks!

    [CODE]
    If (Me.fraDVT_SCD_ ORDER = 2 And (Me.DVT_RECENT_ LE = No And Me.DVT_THROMBUS = No And Me.DVT_BKA = No And Me.DVT_SCD_OTHE R = No)) Then
    MsgBox.....
    else
    docmd.gotopage 2
    end if
    [/CODE}
    See more | Go to post

    Leave a comment:


  • elainenguyen
    replied to IFElse Statement
    Hi,
    I've tried the following two ways, but then when user select one of the 4 fields, instead of allow user to go to the next page since the condition has been met (either choose all 4 or 1 among the 4, it popped up the break message again, until 4 options answered Yes.
    Code:
    If (Me.fraDVT_SCD_ORDER = 2 And (Me.DVT_RECENT_LE = NO Or Me.DVT_THROMBUS = NO Or Me.DVT_BKA = NO Or Me.DVT_SCD_ORDER = NO)) Then
    MsgBox....
    ...
    See more | Go to post

    Leave a comment:


  • elainenguyen
    replied to IFElse Statement
    Hi,
    I've tried that way too but when I tested the form, it didn't show the break message, and also allowed user to move to the next page.
    I've placed the code in the On Click command. I've also placed the code in the OnCurrent command.
    Code:
    Private Sub cmdPageDown2_Click()
    If Me!fraDVT_SCD_ORDER = 2 Then
      If IsNull(Me!DVT_RECENT_LE) Or IsNull(Me!DVT_THROMBUS) Or IsNull(Me!DVT_BKA) Or IsNull(Me!DVT_SCD_OTHER)
    ...
    See more | Go to post

    Leave a comment:


  • elainenguyen
    replied to IFElse Statement
    Thanks for your help.
    My form has many fields, not just those 3 fields. It was jsut an example. I was trying to put the code in the ArrowDownPage, if user didn't answer, it'll show the break message and user can't go down the page until they choose either 3 or all.
    thanks!
    See more | Go to post

    Leave a comment:


  • elainenguyen
    replied to IFElse Statement
    here is my actual code but it seems not working properly. Please help, thanks!

    Code:
    Private Sub cmdPageDown2_Click()
    If Me.fraDVT_SCD_ORDER = 2 And Me.DVT_RECENT_LE = "" _
    Or Me.fraDVT_SCD_ORDER = 2 And Me.DVT_THROBUS = "" _
    Or Me.fraDVT_SCD_ORDER = 2 And Me.DVT_BKA = "" _
    Or Me.fraDVT_SCD_ORDER = 2 And Me.DVT_SCD_OTHER = "" Then
    MsgBox "Must choose
    ...
    See more | Go to post

    Leave a comment:


  • elainenguyen
    started a topic IFElse Statement

    IFElse Statement

    I am trying to write a code in the cmdSave to give a break message when user didn't answer a question. For example. I have a option field fraAge>60 with Y and N, when user chooses N as an aswer, user has to choose 3 other Y/N checkbox fields which belong to No answer i.e Age70, Age80, Age90. If user didn't check any of those 3 fields, then I have to give a break message and won't allow user to move on unless they check either Age70, Age80 or Age90....
    See more | Go to post

  • elainenguyen
    started a topic If else statement

    If else statement

    I am trying to write a code in the cmdSave to give a break message when user didn't answer a question. For example. I have a option field fraAge>60 with Y and N, when user chooses N as an aswer, user has to choose 3 other Y/N checkbox fields which belong to No answer i.e Age70, Age80, Age90. If user didn't check any of those 3 fields, then I have to give a break message and won't allow user to move on unless they check either Age70, Age80 or Age90....
    See more | Go to post

  • elainenguyen
    replied to On Click Event Help
    Thanks alot for your help, and sorry about the way my code was posted. Will remember to post code in a correct format in the future.
    See more | Go to post

    Leave a comment:


  • elainenguyen
    started a topic On Click Event Help

    On Click Event Help

    I have a frame with option 1 and 2, I put code in he "on click" event so that when the user choose 2, the lable of the frame change to red, when the user choose Yes, lable of the frame color change to black. Here is my code. It works when the user choose 2, but it doesn't change back to black color when user choose 1. Also, when user go back to view the record, even though the option chose 2, the color wouldn't stay as "red"....
    See more | Go to post
    Last edited by NeoPa; Sep 4 '08, 11:14 PM. Reason: Please use the [CODE] tags provided

  • Save Update to a current record as a NEW RECORD

    I have a form that allow users to view the record, make update to the record, but then I want to allow user to save the update as a NEW RECORD. this is my code, and I need help.

    doCmd.save "frmReview",,ac NewRec
    doCmd.close acform, "frmReview"

    thanks!
    See more | Go to post

  • elainenguyen
    replied to Using OR and IIF
    Thanks Nico for your help, I was able to complete the querry. It's working now.
    Thanks!
    Elaine
    See more | Go to post

    Leave a comment:


  • elainenguyen
    replied to Using OR and IIF
    Thanks for everyone's help.
    There are about 25 questions per survey. I've tried Scott's way, it works. But since I have to use one column per performance question per category, and there are 6 categories re: 5, 4, 3, 2, 1 and 0; I am afraid that I might run out of of columns, but I'll try.
    Thanks!

    Elaine
    See more | Go to post

    Leave a comment:


  • elainenguyen
    replied to Using OR and IIF
    Scott,
    Sorry for the confusion, I want to count how many 5's this employee received for his/her evaluation, not the sum.
    for example. There are 20 questions in an evaluation form, this person completed 2 surveys for Jan, therefore, the total of question is 40. I want to coutn how many 5 she received. For example if she received 20. the rate for her "Always exceeds" will be 20/40.
    Thanks!
    See more | Go to post

    Leave a comment:


  • elainenguyen
    replied to Using OR and IIF
    HI,
    Here is my table data structure:
    tblAdmin (for table Administration)
    fields:
    performance_1, type is number, byte
    performance_2, type is number, byte,
    performance_3, type is number, byte, etc.

    For all these fields, the criteria is
    5 is Always Exceeds
    4 is Often Exceeds
    3 is Consistently meets
    2 is Sometimes meets
    1 is Does not Meet
    0 is N/A...
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...