User Profile

Collapse

Profile Sidebar

Collapse
gchichester
gchichester
Last Activity: Mar 7 '11, 02:14 PM
Joined: Aug 11 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • gchichester
    replied to Variable from Parameter Query
    I'm must be missing something, My query works as expected
    It prompts me for the week number and returns the data I need. What I need is to assign that week number that was just used in the query to a variable.
    I need use the same week number to check for records in a table before I appended new records.
    I hope this makes sense.

    Thanks
    Gil
    See more | Go to post

    Leave a comment:


  • gchichester
    started a topic Variable from Parameter Query

    Variable from Parameter Query

    Is there a way to assign the data from and Input box of a parameter query to a variable?

    Here's the parameter for the query;
    ((DatePart('ww' ,[dbo_Hse.ExpDate],2,2))=[Enter Week Number]))
    I would like to assign the "Week Number" the user enters to a variable.

    Thanks for any and all suggestions

    Gil
    See more | Go to post

  • gchichester
    replied to Converting to a Function
    Sorry but I'm confused again!
    Did you test the code with or without the DoCmd.OpenRepor t & the Option Group?
    See more | Go to post

    Leave a comment:


  • gchichester
    replied to Converting to a Function
    The "WhatYear" function code.
    The changes you suggested did not work.
    See more | Go to post

    Leave a comment:


  • gchichester
    replied to Converting to a Function
    No problem, I deal with the same problem.
    So, Do you have any other suggestions on how to convert
    this code to a function? Or should I just add it to each button?

    Gil
    See more | Go to post

    Leave a comment:


  • gchichester
    replied to Converting to a Function
    ADezii,
    Thanks for the prompt response.
    I added your changed code as a private function of the form code module. Selecting a different year still has no effect on the date range of the report.


    [Code]
    Private Function fWhatYear()
    Dim strCriteria As String

    If IsNull(Me.Seaso ns) Then Exit Function

    Select Case Me.Seasons
    Case 2009
    strCriteria = "[ExpDate] Between...
    See more | Go to post

    Leave a comment:


  • gchichester
    started a topic Converting to a Function

    Converting to a Function

    I'm using this Select Case code in conjunction with a Option Group on a multi-tab form with about 40 run report buttons. The code works fine when included in the Click Event code of a button. I would like to convert it to a function for obvious reasons. I have tried a few variation of a function with no success. What is the best approach for converting a procedure to a function.


    Code:
    Private Sub WhatYear()
    Dim strCriteria
    ...
    See more | Go to post
No activity results to display
Show More
Working...