User Profile

Collapse

Profile Sidebar

Collapse
Wesley Hader
Wesley Hader
Last Activity: Aug 28 '14, 09:14 PM
Joined: Nov 2 '11
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • I'm Lost!

    This is what I have so far.... As I'm sure you can probably tell, I am just trying to feel my way through this. I have only been coding in C# for a couple of weeks.

    Code:
     
    List<string> orders = new List<string>();
    
                foreach (DataGridViewRow dr in ordersTable.Rows)
                {
                    orders.Add(dr.Cells["szPOSOrderNumber"].Value.ToString());
    ...
    See more | Go to post

    Leave a comment:


  • Wesley Hader
    started a topic Using List<T> elements as variable in query

    Using List<T> elements as variable in query

    I am trying to query an Informix database using a List<T> collection's elements as variables. I can build the list and connect to the database, but I am unsure how to iterate through the list and query the database for each item in the collection.

    My list is of type string, and contains Order Numbers. I want to query item information for each order number in the list.

    I hope this is enough information. Thank...
    See more | Go to post

  • Wesley Hader
    replied to JOIN expression not supported
    That's how I got here....

    I can connect to these tables using an ODBC System DSN, but this problem arose when trying to create the connections with VBA Connection strings and manually creating the ADO recordsets. My goal is to have everything coded and go away from using DSN's.
    See more | Go to post

    Leave a comment:


  • Wesley Hader
    replied to JOIN expression not supported
    Thank you dsatino! It seemed like a long shot when I first attempted it, but I thought I would give it a shot.

    Can you point me in the right direction on using ADO recordsets in VBA, creating the VBA TEXT string, and using that to create the SQL string? My problem, I assume, will arise in trying to create the JOINs or what I am thinking of as the relationships between the recordsets.

    I know my wording has not been...
    See more | Go to post

    Leave a comment:


  • Wesley Hader
    replied to JOIN expression not supported
    @Rabbit

    Are you wanting to see what EACH variable is equal to or just the one in the WHERE statement?
    Code:
    WHERE (((" & RsHdr.ioqh_nbr & ")=726148));
    @dsatino

    I have always assumed that this was a syntax error probably related to quotations. This is the first time I have tried using a variable for a recordset in a SQL string so I thought there may be a chance that this is actually...
    See more | Go to post

    Leave a comment:


  • Wesley Hader
    replied to JOIN expression not supported
    Here is the entire procedure. I apologize if I have not been clear.
    Code:
    Private Sub txtTicketNo_AfterUpdate()
    On Error GoTo ERR_txtTicketNo_AfterUpdate
    
    Dim Answer, strSQL, strConn As String
    Dim TicketNo As Long
    Dim Conn1 As New ADODB.Connection
    Dim RsHdr, RsCust, RsCustAddr, RsHdrAddr, RsLookup As ADODB.Recordset
    
    strConn = "ODBC;Dsn='';" & _
              "Driver={INFORMIX
    ...
    See more | Go to post

    Leave a comment:


  • Wesley Hader
    replied to JOIN expression not supported
    Thank you for the quick response.

    The SQL string is executed by an After Update event using
    Code:
    DoCmd.RunSQL strSQL
    See more | Go to post
    Last edited by Wesley Hader; Jul 25 '12, 11:18 PM. Reason: Rewording

    Leave a comment:


  • Wesley Hader
    started a topic JOIN expression not supported

    JOIN expression not supported

    I have been working on making my DB DSN-less and I have a bit of a problem. After racking my brain all day over the ODBC connection string to an Informix database and how to link to the tables as recordsets, I have finally got it to work!

    But then I tried to QUERY the recordsets....

    Here is the SQL String I am using.

    Code:
            strSQL = "INSERT INTO Logsheet_Table ( Ticket_No, Date_Entered,
    ...
    See more | Go to post

  • Wesley Hader
    replied to Sorting Short Times in Access Query
    Thank you! I was formatting the text data type as a date, instead of storing the data as date time.
    See more | Go to post

    Leave a comment:


  • Wesley Hader
    started a topic Sorting Short Times in Access Query

    Sorting Short Times in Access Query

    I have the following query in my time clock database which I use to display times entered for a specific date range.

    Code:
    SELECT IIf(Weekday([ClockInDate])=2,"Monday",IIf(Weekday([ClockInDate])=3,"Tuesday",IIf(Weekday([ClockInDate])=4,"Wednesday",IIf(Weekday([ClockInDate])=5,"Thursday",IIf(Weekday([ClockInDate])=6,"Friday",IIf(Weekday([ClockInDate])=7,"Saturday","Sunday"))))))
    ...
    See more | Go to post

  • Wesley Hader
    replied to Numbers in Access
    Actually, I made the change to Long and it WORKS! Thanks!!
    See more | Go to post

    Leave a comment:


  • Wesley Hader
    replied to Numbers in Access
    Thanks for the quick reply!

    You are correct. EmployeeNo is stored as a text field. However the example you provided did not change the outcome. I feel like a number field should be stored as such, so I will change that. Are you saying that a number stored as Long will sequence the way I need?
    See more | Go to post

    Leave a comment:


  • Wesley Hader
    started a topic Numbers in Access

    Numbers in Access

    I have a table that holds Employee Information which includes the following fields: EmployeeID(Auto Number), EmployeeNo(Long Integer), EmployeePin(Lon g Integer), and EmployeeName(Te xt). I assign employee numbers in increments of 10. (i.e. 10, 20, 30, 40...)

    I use the following code in a form's on load event to to assign a unique employee number to the EmployeeNo Field.

    Code:
    strSQL = "SELECT TOP 1 EmployeeNo
    ...
    See more | Go to post

  • Wesley Hader
    replied to Calculating overtime
    I see how this should work. However, when I use the provided code, the query returns only totals from the last [WeekNo]. Instead of totals from each separate [WeekNo]. See attached for an example.

    Oh and FYI, the code below is modified just a little bit on line #4 to work.

    Code:
    SELECT   [EmployeeNo]
           , DateDiff('d',[Enter Start Date],[Enter End Date]) \ 7 AS [WeekNo]
           , DateAdd('ww',[WeekNo],[Enter Start
    ...
    See more | Go to post
    Last edited by NeoPa; Nov 30 '11, 01:38 AM. Reason: Made pic viewable and highlighted selected code

    Leave a comment:


  • Once again, this works perfect! Thank you! Next time I will read the Attach Database Instructions.
    See more | Go to post

    Leave a comment:


  • Sure. I have attached a sample database to show what I mean. On the form "Format Dates" I have four date/time Text Boxes. They are each formatted to show either Time OR Date but just try clicking inside one of the boxes to see what happens. In my original database I need to be able to edit the records by changing the text in the Text Boxes. You will see how this could become a nuisance....
    See more | Go to post

    Leave a comment:


  • I just realized, This does display the data correctly and allow me to change accordingly. But one small glitch is that when you click inside the formatted TextBox, the entire field is then displayed. Not so user friendly. Is there a way to keep the original formatting from showing up when you click in the TextBox?
    See more | Go to post

    Leave a comment:


  • Wesley Hader
    replied to Calculating overtime
    What you have described in #4 of the above reply is where the root of my original problem lies. I understand how to figure the Overtime hours for a single week. Where I get lost is how to create the "Inner Query", or the logic to label a specific set of dates to be considered part of one working week and a completely different set of dates to be part of a different working week. All the while knowing someone may want to run this report...
    See more | Go to post

    Leave a comment:


  • I understand, and that totally makes sense! I wasn't thinking that the TextBox has the ability to Format data built in. Thanks!!
    See more | Go to post

    Leave a comment:


  • Wesley Hader
    started a topic How to Edit a formatted Date/Time field

    How to Edit a formatted Date/Time field

    I have two Date/Time fields[ClockIN] and [ClockOut] in a table called tblTIMES that each store a date and time formatted as (mm/dd/yy hh:nn:ss AMPM).

    I use "Format("ClockI n","mm/dd/yyyy")" and "Format("ClockI n","hh:nn:ss AMPM")" to separate the respective Date or Time where I need to do so.

    One of those places is a text box on a form that I want to use to edit...
    See more | Go to post
No activity results to display
Show More
Working...