Solved

Modify code written by another coder

Posted on 2014-10-21
6
84 Views
Last Modified: 2014-10-21
The Coder Wrote this project For Tracking Roofing Bids
I am trying to add functionality to do track all kinds of bids eg; Kitchen remodle, New Fence bids etc
I have added a combobox where a user can enter these bids titles eg;Kitchen remodle, New Fence bids etc
I have ran into an issue when trying to save these new titles the problem is this:
I need to reset the udt's add company when a new title is saved. There is a function Add_Company that does this.
For instance:
Roofing Bids
Has 3 companies names and info in a udt
When a different cbo title(new fence or ?) is made then the company name and info should not be to the list of roofers
I think the RoofingCompany udt need to be emptied. How can this be done ?
See attached-For-FReelance-Roof-Bids-09-03-14.zip
0
Comment
Question by:isnoend2001
  • 3
  • 3
6 Comments
 
LVL 46

Expert Comment

by:Martin Liss
ID: 40395689
You either attached the wrong project or it is missing a form or module because there is no Add_Company function or RoofingCompany in the project.
0
 
LVL 46

Expert Comment

by:Martin Liss
ID: 40395707
Looking at an older version of your project I see that RoofingCompany is an array. Do you want to empty the whole array? If so then you can simply do ReDim RoofCompany(0) which will leave you with one, blank, array member.

Here's an article that may help.
0
 

Author Comment

by:isnoend2001
ID: 40395879
Thanks martinLiss
whoops uploaded the wrong project
I guess that is what needs to be done. what i have ran into:
Project has 3 roofing companies with all their data.
ABC Roofing
John Doe Roofing
Bills Roofing
I add a new Bid Type say Bathroom remodle with a new company(Joes Bathrooms) and click save or add
I am ending up with:
ABC Roofing
John Doe Roofing
Bills Roofing
Joes Bathrooms this should not be include with roofing Bids
So if its a new Bid Type added to the cbo
This will fix it
ReDim RoofCompany(0)
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:isnoend2001
ID: 40395913
I have added a new variable
if mbNewBidType then 'new bid type added to cboBids
ReDim RoofCompany(0)
end if
Think this will solve the issue ?
0
 
LVL 46

Accepted Solution

by:
Martin Liss earned 500 total points
ID: 40395948
I can't really tell because I don't know your project well enough, but doing ReDim RoofCompany(0) will wipe out everything in RoofCompany, so if that's what you want to have happen then you should do it.
0
 

Author Closing Comment

by:isnoend2001
ID: 40395957
Thanks MartinLiss I will try it, if it does not work i will remove all the ocx's and post the project in a new question
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now