User Profile

Collapse

Profile Sidebar

Collapse
Carl Witte
Carl Witte
Last Activity: Jul 18 '19, 02:44 PM
Joined: Dec 1 '06
Location: Waverly, NE
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Carl Witte
    replied to Total hours in Report over 24 hours
    Hi Jimmy. I'll throw out some guesses... Could you be successfully showing hours, but that dates are being missed. (In your example, you have 8*5 or 40 and you are showing 16 which is the remainder of hours after the date is in the ones place.) If this is the case than Narender's solution will work correctly for you if you are using code SQL.

    If this isn't the case, I recommend, if you cannot upload a copy as Narender said, you...
    See more | Go to post

    Leave a comment:


  • First let me say that my comment was in no way a indictment of VBA. Only of my ability to figure out the problem. Per your request I am posting significant portions of my code. I fully agree it is clunky to build a separate macro to do this correctly.


    This is on a form I use to order my records for priority testing. Clicking on this opens the specific testing request. This appears to work perfectly. The correct record...
    See more | Go to post

    Leave a comment:


  • I want to apologize for my late response. I appreciate all of your help. I've decided to use a write around. For future reference here is what I found and did.

    The VBA code to open the form works perfectly and always did. The correct record opens up. After the form is open, there is a reference issue where the first record is found through code, not the record currently displayed, even when referencing fields that have various names...
    See more | Go to post

    Leave a comment:


  • Correct record and PK displayed. First record used when code on form called.

    Hi Folks. I'm lost and I can't find a spot where this answer exists. I'm opening a specific form to a specific record. Easy right?

    Code:
        DoCmd.OpenForm "frm_WorkOrder", acNormal, , "[ID]=" & [ID], , acWindowNormal
    And that ID is the primary key...

    The form opens up to the correct record. Then I have some code that runs after the form is open, the form displays the correct...
    See more | Go to post
    Last edited by zmbd; Oct 30 '15, 01:49 PM. Reason: [z{merged related posts}]

  • Ok. This is probably silly as the other two guys who have commented know WAY more than I do. But here are two ideas, if I understand your goal correctly.

    Both involve adding an autonumber field and then removing the now redundant short text field.

    You could use a standard prefix "CUST" and then the autonumber field and eliminate the short text entirely. This doesn't change the underlying data type (long)...
    See more | Go to post

    Leave a comment:


  • Ok. I now have figured out how to reconnect to the tables in SQL. I have to
    1. delete the old table
    2. relink the table
    3. specify the primary key


    This is clearly a bad idea. My code to do relink the tables is below. I feel like I'm close but I can't quite get there. Any help would be great.
    Code:
    Public Function startup()
        Dim lclTBLstr(50) As String
        Dim sqlTBLstr(50) As String
        Dim countER As Integer
    ...
    See more | Go to post

    Leave a comment:


  • Carl Witte
    started a topic MS Access connection to SQL server via VBA

    MS Access connection to SQL server via VBA

    Hello. I have MS Access 2013 and I am trying and failing to programmaticall y connect to an sql server. Whenever I open a table (or do anything really) I get the manual connection screen and am able to reconnect manually. (See attached images for detail)

    My goal would be to remove this manual connection screen through executing specific vba code at startup.

    After research I have come up with the following code...
    See more | Go to post

  • You will need to add a integer variable
    Code:
    dim responSE as integer
    response = msgbox("Warning",vbYesNo+vbdefaultbutton2,"WariningTitle")
    if response = vbno then
    goto Exit_supersub
    'this allows me to change the type of the msgbox buttons
    elseif response = vbyes then
    'run my queries
    end if
    
    Exit_supersup
    Exit Sub
    I do weird capitalization...
    See more | Go to post

    Leave a comment:


  • You are asking for quite a lot here. Here are the basic steps you will need.
    1. Find the right record
    2. Get that information someplace useful
    3. Play with that information.

    Finding the right record is general done using a query. Assuming you have the person entered you can build a query that has the person, the task name, and the 'due date.'. Your criteria will be the person. You will by due date descending and you will find the first (oldest)...
    See more | Go to post

    Leave a comment:


  • Carl Witte
    replied to Error logging
    Thanks NeoPa. I put them in separate lines for personal clarity. That SQL statement is getting a little rough on a reader.

    Carl
    See more | Go to post

    Leave a comment:


  • Carl Witte
    replied to Error logging
    Thank you ChipR. I'll try out the replace function. I must just only throw the errors with quotes and apostrophes. Clearly a problem with my coding that I keep throwing the same types of errors.

    In the last week more than 8 out of 10 errors I've thrown are balked by the SQL system.
    I'll have to use
    Code:
    err_string = replace(err_string, chr(34), "<DQ>") ' fixes "
    err_string = replace(err_string,
    ...
    See more | Go to post

    Leave a comment:


  • Carl Witte
    started a topic Error logging

    Error logging

    Hi. I've built a shared table to track errors from all users but I'm running into a problem. I populate this table with an SQL command. Many, maybe even most, errors have protected characters such as the apostrophe (') or a quote (") in them. To get arround this if there is a protected character it isn't logging the error description, just the number.

    Code:
        
    DoCmd.RunSQL "INSERT INTO ErrLog ( [User], ErrorNum,
    ...
    See more | Go to post

  • Carl Witte
    replied to OutputTo command to an FTP
    No problem. I probably wasn't clear in my original post. :-)
    Carl
    See more | Go to post

    Leave a comment:


  • Carl Witte
    replied to OutputTo command to an FTP
    Thank NeoPa. Missed it when I was looking through my search of the archives.
    I'm using the wininet.dll with no problems for the transfer. My concern was after I have connected to the FTP site could outputto place the file there directly or did the file have to be written locally then transferred. It appears the answer is the file has to be written locally then transferred.

    Thanks again for your help.
    Carl
    See more | Go to post

    Leave a comment:


  • Carl Witte
    replied to OutputTo command to an FTP
    Thanks for your help.
    See more | Go to post

    Leave a comment:


  • Carl Witte
    replied to OutputTo command to an FTP
    Out of curiosity do you find the log file to be of particular use? To date I only create and use a log file when I have an error indicating a failure. Carl
    See more | Go to post

    Leave a comment:


  • Carl Witte
    started a topic OutputTo command to an FTP

    OutputTo command to an FTP

    Hello. I'm using Access '07 and I need to regulariliy put a PDF on a FTP site. Can I do this directly with the outputto command?
    Code:
    DoCmd.OutputTo acOutputForm, form_name, acFormatPDF, "ftp://files.myftpsite.com/" & lotnum & ".pdf", False
    I can't seem to make this work. Or do I need to use the OutputTo command to a local file upload separately. I can do the steps separately just fine but I always...
    See more | Go to post

  • Carl Witte
    started a topic Business date difference

    Business date difference

    Has anyone got a good method to calculate buisness days differences or predict a date based on buisness days?

    For example, If today 9/12 I place an order from vendor A they will say OK it will be ready in 10 business days. That means it will be ready on 9/26. If I had the same order on 8/29 I would have the order ready on 9/15.

    My best idea is to put a table of dates that are holidays for my vendor (I have to...
    See more | Go to post

  • Its better. Seems to me that you are trying to calculate answers for some variables. I'd separate it into multiple queries. Call the first your "N" query. Perform your first calculation.

    Making sure to use the "WHERE" your field for your data ="N"

    Then make a second query called your "Not N" query.

    Making sure to use the "WHERE" your field for your...
    See more | Go to post

    Leave a comment:


  • I'm confused. Could you post a mathmatical formula of what exactly the transformation is supposed to be?
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...