Solved

Modify code written by another coder

Posted on 2014-10-21
6
82 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 45

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 45

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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

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 45

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

707 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

12 Experts available now in Live!

Get 1:1 Help Now