User Profile

Collapse

Profile Sidebar

Collapse
mburch2000
mburch2000
Last Activity: Sep 8 '15, 11:15 AM
Joined: Oct 10 '12
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • mburch2000
    replied to VBA: Loop hangs up after one pass
    Rabbit, THANK YOU!!! Your were right. The HRow variable was getting reset to rowStart of the 1st group in the ProcessGrp function, thus continuing to loop through the first group. I set HRow variable to a new variable in ProcessGrp and it worked. I really appreciate your help, I have been stuck on this for far too long. Have a great day!
    See more | Go to post

    Leave a comment:


  • mburch2000
    replied to VBA: Loop hangs up after one pass
    Thank you for your reply Rabbit. I'm not sure I understand. The LastRow variable is set in the beginning, or at least I believe it is. The rowEnd variable is also set in the CaptureGrp function, or at least I believe it is. So what are you referring too and where if I may ask. Thank you
    See more | Go to post

    Leave a comment:


  • mburch2000
    started a topic VBA: Loop hangs up after one pass

    VBA: Loop hangs up after one pass

    I have three fields of data:
    1. CaseID: need to Group by
    2. Side: either L or R
    3. AcctNum

    My main Sub: CaptureGrpMacro determines the start(rowStart) and end(rowEnd) rows of each group. The hasLorR function determines if Side is L or R and if so turns flag to True. The Scenario function takes the Scen variable and places in ScenL or ScenR field based on Side being L or R. So if a group(CaseID) has both a Side...
    See more | Go to post

  • When I run it from the VBE window, the Macro MsgBox pops up apparently looking for a Macro. I finally realized that my settings under File/Option/Trust Center Settings/Macros Settings needed to default to Enable All Macros. I got something to work before I left, but I will not be able to test anything else for two days when I return. Thanks for your help. The above code still did not work like I wanted though. I really need to select all files...
    See more | Go to post

    Leave a comment:


  • mburch2000
    started a topic Import multible text files into Access table

    Import multible text files into Access table

    I am trying to import multiple text files into an Access table. I build a Form with a button, named "Import_Dea ls". In the On click Event trigger I entered the following code, but it don't import my files. can someone please help?

    Thanks,
    Mike
    Code:
    Private Sub Import_Deals_Click()
    
        Dim strPath As String
        Dim strFile As String
        Dim strTable As String
        Dim strSpecification
    ...
    See more | Go to post

  • Excel VBA: Grouping rows (code doesn't get right results)

    I currently have VBA code in Excel to pull desired results, but it's not working correctly. I really need help! I am attaching the spreadsheet and the code. In the spreadsheet, I use cells F5:P16 to show the results of my Sub CaptureGrp, so I can see if different sections of code work. Before I run Sub CaptureGrp I delete data from F5:P16.

    I have data in cells A5:E16. I am trying to group data based on "A" (RuleID)....
    See more | Go to post

  • Thanks for your help. I just got it to work before reading this post. I will research the above function. It may be an improvement on what I got, but thank you for hanging in there with me. I really appreciated it!

    Thanks,
    Mike
    See more | Go to post

    Leave a comment:


  • Excel VBA: Group on rows, Need to determine Start & End of each group

    I have data in columns A through B where column A (RuleID) identifies rows that are considered together as a group.

    I need to determine the Start Row and End Row for each Group (RuleID). This must be done with VBA code as it is part of a larger Macro.

    Sample Data is:
    RuleID Key
    AB287 L
    AB287 R
    AB287 R
    CN356 L
    CN356 L
    CN356 R
    CN356 R
    DC879 L
    MX289 R
    JJ546 L...
    See more | Go to post
    Last edited by Rabbit; Aug 23 '15, 06:09 AM. Reason: Fixed code tags

  • I have data in columns A through G where column A (RuleID) identifies rows that are considered together as a group.
    Column D (Key) will have either "L" or "R" for each row.

    I want an indicator that will reflect whether each group contains rows where all Key values are "L", or all are "R" OR are both. There is no need to sort the data, as all Rows are entered in groups of RuleID. This needs...
    See more | Go to post

    Leave a comment:


  • Not exactly, but thanks for deciphering what I meant. I need the results in VBA as I am using a Macro to copy, manipulate and paste data to another tab in the file. I will try and be more clear in my next post. Thank you
    See more | Go to post

    Leave a comment:


  • How do I group rows so I can make a decision about the data in another column? Fields below:

    RuleID: need to group data based on this field
    Descr
    Op
    Key: need to figure out if RuleID has Key = All L, All R or both L and R based on RuleID
    AcctNUm
    DID1
    DID2

    Sample Data is:
    RuleID Descr Op Key AcctNum DID1 DID2
    AB287 this L < 0 L CC560100
    AB287 is L >...
    See more | Go to post

    Leave a comment:


  • Thanks, I'll fix and repost it.. Just a tired, I guess
    See more | Go to post

    Leave a comment:


  • Excel VBA: Group on field, use another field for decision

    I have an Excel file with two tabs: Source & Target. Using VBA (Macro), I am attempting to take data in Source and place in Target. The fields are normally manipulating in some form, so not a straight copy and paste. My problem: how do I group rows based on "RuleID" (1st field) and make a decision based on results in "AcctNum" (5th field) and then place results in either DID1 (6th field) or DID2 (7th field)?
    ...
    See more | Go to post

  • Thanks zmbd. Good information. I will read through this and try and fix my code. I appreciate your help
    See more | Go to post

    Leave a comment:


  • Hi zmdb,I am not duplicating data between tables. I am pulling data from both tables on a form using a query. I then need to create a new record with most of the fields on the form. The reason is so that the users don't have to re-enter the same data on the new record as only a few fields are being changed on the new record.
    See more | Go to post

    Leave a comment:


  • I guess what I am asking is the structure of my code right, assuming I have all of the table/field names correct? If it is, then I will have to find the problem somewhere else. I'm not sure why the new record does not include the fields Related_1, Related_2, etc.
    See more | Go to post

    Leave a comment:


  • Hi zmbd,

    My mistake! The original code does not have the spaces. I don't get an error. I tried to create a record using this code, but only part of the new record was created. The fields in the Related table did not pull over to the new record and I don't know why. I am sorry if this is vague. Thanks...
    See more | Go to post

    Leave a comment:


  • Create New Record using VBA code from two tables

    I have a button on a form that creates a new record, based on the current record, when the user clicks the button. The original code from the MASTER table worked fine. Now I need to add additional fields to the new record from another table: Related. When I added the code for the Related table, the fields in the Related table did not populate on the new record. Can someone please help? The code is below. Thanks

    Code:
    Private Sub Add_Click()
    ...
    See more | Go to post

  • mburch2000
    replied to Add records using VBA - Access 2007
    Hey Rabbit,

    I tried, but my code still didn't work. I decided to try it a better way and it WORKED! The code is much cleaner, see below and thanks for your help.

    Code:
    Private Sub Add_Click()
        Dim db As DAO.Database
        Dim rs As DAO.Recordset
            
        On Error Resume Next
        
        Set db = CurrentDb
        Set rs = CurrentDb.OpenRecordset("SELECT * FROM [MASTER LIST]")
    ...
    See more | Go to post

    Leave a comment:


  • mburch2000
    started a topic Add records using VBA - Access 2007

    Add records using VBA - Access 2007

    I am using a form to add records to a table named "MASTER LIST". This forms pulls up existing records, allows the user to change certain fields, and then the user clicks an Add button. The Add button is suppose to create a new record based on the information on the form. Basically I am creating a new record based on the old record, but with certain fields updated. The Add button is driven by VBA code, see below, but it is not creating...
    See more | Go to post
No activity results to display
Show More
Working...