User Profile

Collapse

Profile Sidebar

Collapse
jmar93
jmar93
Last Activity: Nov 15 '10, 12:23 AM
Joined: Mar 20 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • jmar93
    replied to Day of week
    Works perfectly, thank you very much!

    Jeff
    See more | Go to post

    Leave a comment:


  • jmar93
    started a topic Day of week

    Day of week

    Hi,

    I am using Access 2007. I have a report that has labels that need to be visible only on certain days of the week.
    I have tried the following code in the reports load event, but it doesn't work. Does anybody have any ideas?

    Code:
    Private Sub Report_Load()
    Dim vDay As VbDayOfWeek
    If vDay = vbMonday Then
    Me.Label0.Visible = True
    Else
    Me.Label0.Visible = False
    End
    ...
    See more | Go to post

  • jmar93
    replied to Help with INSERT INTO
    Thanks hype 261,

    That did it.

    Thanks again,

    Jeff
    See more | Go to post

    Leave a comment:


  • jmar93
    started a topic Help with INSERT INTO

    Help with INSERT INTO

    Hi,

    I have written the following code to insert records into a table in Access 2007:

    Code:
    Option Compare Database
    Dim DueDate As String
    Dim PO As String
    Dim Customer As String
    
    Private Sub Command1_Click()
    CurrentDb.Execute "INSERT INTO Table2 ([DueDate],[PO],[Customer]) VALUES (" & DueDate & "," & PO & "," & Customer &
    ...
    See more | Go to post

  • jmar93
    started a topic Help with transfertext method

    Help with transfertext method

    Hi,

    I am using Acess 2007 and am writing the data from a table into a text "CSV" file using the "transferte xt" method. I run the following code and it creates the file with a name I input at runtime and saves the file to my documents folder. I can't figure out how to specify a different location to save the file without hard coding the location and file name. Any help will be greatly appreciated.

    Code:
    Dim
    ...
    See more | Go to post
    Last edited by NeoPa; Oct 5 '10, 02:47 PM. Reason: Please use the CODE tags provided

  • jmar93
    started a topic If then statement based on query results

    If then statement based on query results

    Hi,

    I am using Access 2007. I am trying to set up a timer event with an "If Then" statement that runs the following code:

    SELECT Count([Schedule].MAS500number) as CountOfRecords
    FROM Schedule
    WHERE (((Schedule.Ord erClass) Like "*remake*") AND ((Schedule.Rema keInt) Is Null) AND ((Schedule.Stat us) Is Null Or (Schedule.Statu s)<>"shipped")) ;

    and if the "CountOfRecords "...
    See more | Go to post

  • jmar93
    replied to Add records to a recordset
    Forget it, figured it out.

    thanks,
    Jeff
    See more | Go to post

    Leave a comment:


  • jmar93
    replied to Add records to a recordset
    Hi,

    One last question, what is the easiest way to replace the 10000 in the following line:

    Do Until x > 10000

    with a number that you enter at run-time?

    thanks,
    Jeff
    See more | Go to post

    Leave a comment:


  • jmar93
    replied to Add records to a recordset
    There was a null value in the source table, once I removed it everything works great. Thank you so much for all of your help, it was huge.

    thanks again,
    Jeff
    See more | Go to post

    Leave a comment:


  • jmar93
    replied to Add records to a recordset
    Change made no difference.
    See more | Go to post

    Leave a comment:


  • jmar93
    replied to Add records to a recordset
    I don't know how line got pasted in my post, it's not in the code. I've made the changes and now I get a "run-time error '94'", "invalid use of null" on the following line:
    Code:
    x = x + rsDest.Fields("TotalSF")
    
    
    Private Sub Command5_Click()
    Dim rsSource As Recordset
    Dim rsDest As Recordset
    Dim x As Long
    
    Set rsSource = CurrentDb.OpenRecordset("Schedule")
    ...
    See more | Go to post
    Last edited by NeoPa; May 19 '10, 10:32 AM. Reason: Please use the [CODE] tags provided.

    Leave a comment:


  • jmar93
    replied to Add records to a recordset
    I modified the code and now I get the following error:

    Compile error:
    Type-declaration character does not match declared data type, and it highlights "Fields" behind "rsSource" in the following line:

    Code:
    rsDest!Fields!("Customer") = rsSource!Fields!("Customer")
    
    
    
    
    
    
    Private Sub Command5_Click()
    Dim rsSource As Recordset
    Dim rsDest
    ...
    See more | Go to post
    Last edited by Niheel; May 18 '10, 06:21 PM. Reason: please use code tags and proper punctuation and grammar

    Leave a comment:


  • jmar93
    replied to Add records to a recordset
    I still can't get it to work, I have included the code I have tried. I have tried it 2 different ways and both return a "type mismatch" error. Any ideas?

    Code:
    Private Sub Command5_Click()
    Dim rsSource As Recordset
    Dim rsDest As Recordset
    Dim x As Long
    
    Set rsSource = "Schedule"
    Set rsDest = "Table2"
    x = 0
    With rsSource
        .MoveFirst
        Do Until x
    ...
    See more | Go to post
    Last edited by Niheel; May 18 '10, 06:20 PM. Reason: added code tags [code] . . . . [/code]

    Leave a comment:


  • jmar93
    replied to Add records to a recordset
    OK, I guess I don't understand recordsets at all. I think I understand dsatino's
    "do until loop", but after the records have been added to the cutoff point how do I place them in a table so I can use them to generate a report?

    thanks,
    Jeff
    See more | Go to post

    Leave a comment:


  • jmar93
    replied to Add records to a recordset
    What I am trying to do is use a recordset to generate a report that lists the oldest orders in a table up to the point were their cumulative footage's total a predetermined amount, say 1,000feet.

    Example:

    order #1 250 feet
    order #2 200 feet
    order #3 550 feet

    for a total of 1,000 feet.

    thanks,
    See more | Go to post

    Leave a comment:


  • jmar93
    started a topic Add records to a recordset

    Add records to a recordset

    I am using Access 2007 and am trying to add records from a table to a recordset. I understand how to add all of the records from the table, but need to figure out how to only add records until a criteria is meet. Each record contains a footage field which contains the footage of an order. I need to add records to the recordset until the total of these footage fields reaches a predetermined total. Example: say the predetermined total is 1,000...
    See more | Go to post

  • jmar93
    replied to Null values in a query
    Thanks, Tasawer that worked great.
    See more | Go to post

    Leave a comment:


  • jmar93
    started a topic Null values in a query

    Null values in a query

    Hi,

    The following is a query the returns the total sq. footage of products that are in a category named "Cabinets". I am trying to figure out how to get it to return a zero when there is no footage instead of a null value. I have tried to use the NZ function, but can't seem to find the right place to put it. Can anyone help?

    SELECT DISTINCTROW qrySqFtShippedL W.Area, Sum(qrySqFtShip pedLW.[Sum Of SqFtShipped])...
    See more | Go to post

  • jmar93
    started a topic Query based on other queries

    Query based on other queries

    I am using Access 2007 and have a query call "qryProductionR eport" that uses multible other queries as it's records source. When any of these source queries returns a null value then "qryProductionR eport" returns no values at all. Is there a way to work around this or a way to get the source queries to return a value of "0" instead of a null value?

    thanks,
    Jeff
    See more | Go to post

  • jmar93
    replied to Date query spanning 2 years
    Hi NeoPa,

    Your code works great so I will be switching over to it.

    thanks

    Jeff
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...