Someone Please Help!!!

  • Thread starter Thread starter CFP - Russell
  • Start date Start date
C

CFP - Russell

Guest
Hello everyone, I'm having a difficult time getting a subform to display properly based on a selection chosen by a listbox.

I have attatched a stripped version of the database I am working on. I would greatly appreciate any help anyone can give me. Its a rather simple problem, I just cant seem to get it right.

You can download the file here customercontacts.zip

Thanks,
Russell
 
Sorry,

1) On the main form you must click "find a customer"

2) Then click "company name"

3) Then double click on a company

4) Next click on "contacts"

The problem is here, when I try to click on a contact I would like for the persons numbers to come up.

Everything works fine like it should in the tables. I only have a problem getting the listbox to control the results in the subform.

Thanks,
Russell
 
CFP - Russell said:
Sorry,

1) On the main form you must click "find a customer"

2) Then click "company name"

3) Then double click on a company

4) Next click on "contacts"

The problem is here, when I try to click on a contact I would like for the persons numbers to come up.

Everything works fine like it should in the tables. I only have a problem getting the listbox to control the results in the subform.

Thanks,
Russell

Im not understanding what you';re trying to do..youre basing your subform on a contacts table..when you click contacts im prompted for a parameter! Cause access does not know ContactNameID. What the hell is a contactNameID..you got to tell us what in the world you're trying to accomplish..to me your subform is wrong because you dont have the master child setup correctly.
 
Thanks Jon that works great. The only problem is that the listbox displays all people in the contactnames table.

Do you know how to make it so that only the people who link up with the company that is selected show up.

For example, if you open up the Chief Fire Prevention record, only contacts Russell and Jason would show.

Thanks,
Russell
 
CFP - Russell said:
Thanks Jon that works great. The only problem is that the listbox displays all people in the contactnames table.

Do you know how to make it so that only the people who link up with the company that is selected show up.

For example, if you open up the Chief Fire Prevention record, only contacts Russell and Jason would show.

Thanks,
Russell

Yes change the query that the list box uses. Your list box you are currently snatching all the records from the table. You need to specify criteria in this query using the Forms!frmName!FieldName on a specific column so that you dont receive all the names.

Simple enough
 
Also a tip Russell. If you really want help from people in this forum, please have a viable subject line that has to do with your question/problem. Most of the forum gurus ignore questions with subject lines of "PLEASE HELP!!!" and such. It is a waste of time for everyone to read your question, not knowing what they are going to be asked, if they don't know anything about your problem.

Just a little heads up.

Vassago
 
Hey Jon,

The changes worked great however I cannot add new numbers to someone. I get an error that says "You cannot add or change a record because a related record is required in table 'ContactName'

I believe this is happening because of the relationships with the tables however I do not understand how to fix it.

Please help if you can.

Thanks,
Russell
 
CFP, this occurs when you are trying to enter data in your secondary table/form without having entered data in your primary
form/table first. try entering data in your main form first then enter the data in your subfrom/secondary table.

CFP, just FYI these guys are great about answering questions.
However it helps them to answer your questions when you stay
with only one question per thread.
 
Last edited:
Thanks, I understand why the error is happening but I already have a record in the table that it is telling me to add to.
 

Users who are viewing this thread

Back
Top Bottom