Form/SubForm Design

G

Guest

I am a new Access user and was asked to create a form to be used for call
tracking. I have the primary form created and was wondering if I can invoke
a subform to be completed if a particular type code is selected from a combo
box located in my primary form.
 
A

Al Campagna

K,
Could you explain a bit more about what the main form represents, and the same for the
subform.
Also, describe what types of "type code" refers to, and how it would effect the
subform.
It sounds like a normal One to Many setup. Say... One Client on the Main form, with
Many Calls logged against that client, and related by a key unique field like ClientID.
--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."
 
G

Guest

Here's how the tables are currently defined:

CUSTOMERS
Customer ID(autonumber, one to many relationship to CustomerID in REQUESTS
table)
Branch(text)
AccountNumber(text)
CompanyType(text)
CompanyName(text)
ContactFirstName(text)
ContactLastName(text)
Address1(text)
Address2(text)
City(text)
State(text)
Zip(text)
Email(text)
Phone(text)
Fax(text)
Email(text)
Notes(memo)

REQUESTS
Request Number(autonumber, one to many relationship to RequestNumber in
Request Details table)
Branch(text)
CustomerID(number, related to CustomerID in CUSTOMERS table)
UserId(text)
CustomerID(text)
OpenDate(text)
CloseDate(text)
RequestTypeID(text, related to RequestTypeID in REQUEST TYPES table)
Comment(memo)

REQUEST TYPES
RequestTypeID(autonumber)
RequestType(text, one to many relationship to RequestTypeID in REQUESTS table)

Request Types include the following type codes: Reprint, Edit, New,
Dispute. When the "Dispute" Request Type is selected from the Combo Box,
they would like another form to appear that would include 8-10 fields of
additional information that must be gathered from the customer to complete
the request. Some of the additional information is available for input at
the time of the call, some information will need to be added to the request
at a later time. I'm wondering if I should create a main form that includes
a subform or simply create two separate forms.
 
A

Al Campagna

K,
First, please don't delete any of the posts from the thread, that way, everyone can see
the "flow" of the problem all in the latest post.
It's OK to <snip> unimportant info, but leave the gist of the post intact.

My first suggestion would be to make the subform Visible = No by default.
Using the AfterUpdate event of your main form cboRequestType combo... (use your own
object names)
Me.YourSubformName.Visible = cboRequestType = "Dispute"

You'll also need to put that same code in the OnCurrent event of the form, so that the
subform will display/not display accordingly... as you browse from one record to another.
--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."


K Petroski said:
Here's how the tables are currently defined:

CUSTOMERS
Customer ID(autonumber, one to many relationship to CustomerID in REQUESTS
table)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top