Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Enter Parameter, Not Good 1

Status
Not open for further replies.

slammer14

IS-IT--Management
Jun 27, 2001
40
CA
OK now my relationship is One Company to many contacts.

So I have the companyID in both, However I keep getting an error to enter the ContactID? Every Time I open the company form.

The main form is Company with the subform ContactInfo.

Contact Info has a subform called Projects.

Any help would be gratefully accepted.

Mich
 
Is this how your tables are related?

Company
---------
CompanyID PK
CompanyName
CompanyAddress
'etc.

Contacts
---------
ContactID PK
CompanyID FK
ContactFN
ContactLN
'etc.

Projects
---------
ProjectID PK
ContactID FK
ProjectName
'etc.

If you receive the prompt when the form first opens then you probably have a control on the subform that is bound to the ContactID field which is not part of the query defined as the recordsource for that subform. These kind of problems typically stem from changes made to tables or subforms after using a wizard to create the subform. The wizard takes care of things automatically that may need to be tweaked manually later if changes are made to tables or controls.

I would check the recordsource property of the subform (open it in the Query Builder) and make sure there is a reference to the ContactID field. If not, all you have to do is drag/drop it in and you should be back in business.

BTW - cool name

VBSlammer
 
How do I open In query builder? Very new at these types of things?

Hmm how is slammer meant in your name.

Usually sign off with mich cuz people often think I am male.

Thanks for your prompt response.

Slammer14
AKA Mich
 
Open the subform in design view, then open the properties sheet for the subform and locate the 'Recordsource' property. See if the record source is a table name or a SQL statement. If it's a SQL statement, click the recordsource value and a new button will show up to the right of the window with an ellipsis on it (...) click it and it will open the query builder with the SQL statement in it already. Make any needed changes and save, then close the subform and try to open the main form again to see if your changes corrected the problem.

My last name is Slama, which is Czechoslovakian. I've been called salami, slammer, slamdude, slamMan, O'Slama Bin Laden, salama, selma, salma - get it right people, Slama is czech for 'dried grass!'

I usually just go by 'slammer,' but that one was already taken here...

Later,

VBSlammer

 
Thanks, I ended up redoing that one form, spent 10 mins doing that, and all is well.

:) Thanks for your help though.

I am hienze 57 sauce
:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top