Solved

Modify code written by another coder

Posted on 2014-10-21
6
85 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
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 

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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…

777 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