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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

THREE FORMS - AUTOFILL

Status
Not open for further replies.

Angelique

Technical User
Mar 9, 2001
127
AU
I have three forms:

1. Client
2. Quote Details
3. Quote Courses

I have a common link field QClientID.

I have a table called "Client" which should provide QClient with details of existing clients. Otherwise the user has to re-input details already available in that table. Obviously I want to have a combo box that has the existing clients for the user to select and add to list if they are new clients/prospects.

If I try to populate the cboQClient with data from the Client table using a query in the rowsource to display existing clients but if I try to select an existing one, it won't play the game.

Control Source: qryQuoteClientName

SELECT QClient.*, QuoteClient.QuoteClientFullName as QQuoteClientFullName, QuoteClient.QuoteClientDepartment as QQuoteClientDepartment FROM QClient INNER JOIN QuoteClient ON Client.QClientID = QuoteClientID;

Rowsource: SELECT DISTINCTROW (QuoteClient].[QuoteClient], [QuoteClient].[QuoteFullName] FROM [QuoteClient];


What am I doing wrong? I have another forms that is setup similar and it works great! The only difference to this one is that the subform's recordsource is:

SELECT DISTINCTROW QCourse.QCourseID, QCourse.QClientID, QCourse.TrainingID, QCourse.NoOfTrainees, QCourse.Cost, [QCourse]![Cost]*[NoOfTrainees] as SubTotal FROM QCourse ORDER BY QCourse.QCourseID;

I got all sorts of messages, modules already references etc.. Help!

Angelique

 
Hello Angelique
If I understand your message correctly, I think where you are going wrong is in writing a query in the ControlSource of your combo box. There should be a field name there.
Regards, Pavla.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top