[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

09/17/2007 at 10:56AM PDT, ID: 22833867
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.0

help get around a null value with an if statement.

Asked by jcuzzola in Access Coding/Macros

Tags: null, value, statement

Below is a some code that performs a calculation. The problem I am having is that there are some null values.  I'm not sure how to write the code and where to place it that will skip to the next record

I think it should be something like this.
If IsNull(Culture_Days) Then
   goto MoveNext
            End If

Could anyone help
Private Sub CmdCvc2_Click()
   
    Dim dblDays As Double
    Dim dblVolume As Double
    Dim dblVCC As Double
    Dim dblCVC As Double
    Dim cn As New ADODB.Connection   'only one DIM per line, it is easier to read
    Dim rst As New ADODB.Recordset
    Dim LinkCriteria As String
    Dim Culture_Days As String

    'Object MUST always be initialized before they can be used
    Set cn = CurrentProject.Connection
    Set rst = New ADODB.Recordset
   
     DoCmd.Hourglass True
     If IsNull(CboSpinner) Or CboSpinner = "" Then
        MsgBox "Please select a Batch from the drop-down list.", , "Missing Spinner Information"
        Exit Sub
    End If
    LinkCriteria = ""
        LinkCriteria = "[sns_ID] = " & CboSpinner
        Debug.Print LinkCriteria

    With rst
                .Open "SELECT * FROM tbl_U2_Spinners WHERE [SpinnerID] =   " & [sns_ID] & "  ORDER   by culture_Days", _
            cn, _
            adOpenKeyset, _
            adLockOptimistic
           
                Do Until rst.EOF
                dblCVC = (dblDays - rst!Culture_Days) _
                    * (dblVolume * dblVCC + rst!Volume * rst!Viable) _
                    / 10 _
                    / (dblVolume + rst!Volume) _
                    + dblCVC

            'if you don't want to update the table then don't do it :)
            'rst!CVC = dblCVC
             'rst.Update
           
           
            dblDays = rst![Culture_Days]
            dblVolume = rst!Volume
            dblVCC = rst!Viable
            rst.MoveNext
        Loop

     rst.Close
   Set rst = Nothing
   Set cn = Nothing
    'Me.CVC = dblCVC
End With
End Sub
[+][-]09/17/07 11:18 AM, ID: 19906972

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/17/07 11:22 AM, ID: 19907003

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Access Coding/Macros
Tags: null, value, statement
Sign Up Now!
Solution Provided By: jimhorn
Participating Experts: 2
Solution Grade: A
 
 
[+][-]09/17/07 11:30 AM, ID: 19907067

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/18/07 08:56 PM, ID: 19918299

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09/19/07 06:04 AM, ID: 19920219

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09/19/07 06:50 AM, ID: 19920556

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-91 / EE_QW_2_20070628