473,378 Members | 1,106 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Need to assign an object from one form to a collection in a different form

Building a CRM in Access 2007 with a MySQL backend. Have several objects defined, one of which is the Customer object, another is the Jobs object. The Customer object has a collection of Jobs objects in it's declarations. Customer calls in, user opens New Customer form and inputs the relevant contact information and a list of properties owned by the customer. Opening this form creates a new Customer Object.

For each property entered the customer can put in a Work Request. This is handled by a 2nd form. The 2nd form takes all the data about the particular work request and puts it into a Jobs object. What I need to be able to do is copy the Jobs object in the Request form into the collection in the Customer object on the first form, when the Request form is closed. I simply cannot use a subform control as it would make the initial form far to unwieldy and cumbersome. These need to be handled on separate forms.

One thing I did try was creating a new Jobs object in the Customer form when the Request form is opened, and assign the values that way, but I know of no way to initiate the call to add that new object to the collection when the Request form is closed.

Any ideas are GREATLY appreciated.
Sep 24 '07 #1
3 1431
cyberdwarf
218 Expert 100+
Hi Timothy

Could you pls post the structures og your Customer and Jobs objects

Steve
Sep 24 '07 #2
Customer object
Option Compare Text
Public fname As String '
Public lname As String '
Public cid As String '
Public dob As String '
Public user As String '
Public calldate As String '
Public status As String '
Public track1 As String '
Public track2 As String '
Public addr As String '
Public city As String '
Public state As String '
Public zip As String '
Public email As String '
Public cphone As String '
Public hphone As String '
Private ConnString As String
Private Enum exist
rNew = 1
rOld = 0
End Enum
Public properties As Collection
Public appts As Collection
Public jobs As Collection


Jobs object
Option Compare Database
Public jobid As String
Public q1 As String
Public q2 As String
Public q3 As String
Public q4 As String
Public q5 As String
Public q6 As String
Public q7 As String
Public q8 As String
Public q9 As String
Public status As String
Public pid As String
Public cid As String

Those are the declarations in the class modules. Do you need functions as well? Customer is a fairly large size and growing.
Sep 24 '07 #3
I figured it out. Made a module to initialize a Customer object. Call the function to set it in w/e form starts the process i'm working on and then I can use the object thru the lifetime of the operation.
Sep 25 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: Jim | last post by:
Hi, I keep getting form results emailed to me that would indicate a form from my web site is getting submitted with all fields blank or empty, but my code should preventing users from proceeding...
3
by: Mike | last post by:
Hey guys I am pulling my hair out on this problem!!!!! Any help or ideas or comments on how to make this work I would be grateful! I have been working on this for the past 4 days and nothing I do...
16
by: sneill | last post by:
How is it possible to take the value of a variable (in this case, MODE_CREATE, MODE_UPDATE, etc) and use that as an object property name? In the following example I want 'oIcon' object to have...
4
by: Jeremiah J. Burton | last post by:
I am trying to create a database (in Acces 2000) to track my fossil collection. I have a main table that has records for every specemen. I have a secondary table with information on localities...
2
by: Jon Davis | last post by:
The garbage handler in the .NET framework is handy. When objects fall out of scope, they are automatically destroyed, and the programmer doesn't have to worry about deallocating the memory space...
7
by: Jack Addington | last post by:
I've got a fairly simple application implementation that over time is going to get a lot bigger. I'm really trying to implement it in a way that will facilitate the growth. I am first writing a...
4
by: Andres | last post by:
Hi all, I have the problem to assign a variable of type object to a specific class at runtime. I want to use a string variable that specify the class a want to set this object. Is something...
5
by: Dennis Fazekas | last post by:
Greetings, I am creating a web form which will all the user to add an unlimited number of email addresses. Basically I have 3 buttons, "Add Another Email", "-" to remove, and a "Save" button....
1
by: Miguel Dias Moura | last post by:
Hello, I have a GridView in my page which is created in runtime. It works fine. My page has 2 Asp Buttons: - The HIDE button makes GridView.Visible = False; - The SHOW button makes...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.