Solved

Modify code written by another coder

Posted on 2014-10-21
6
86 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
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

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 …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
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…

830 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