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

Form with subform

Status
Not open for further replies.

lpgagirl

Technical User
Feb 3, 2003
202
CA
I have a main form called Workorders by Detachment. It has a combo field that lists all possible detachments, when a detachment is chosen all other fields (address, phone....) populate with applicable data. The form is based on a table called "Detachments" and sorted by detachment name.
I do not want the user to be able to change or edit data it's function is to choose the detachment and show its data. It will have a subform that shows all files associated to the detachment and all applicable work hours for each tech. When I try to change the form so that users cannot edit, the combo field does not respond (cannot choose a detachment). Currently when I open the form and choose a detachment and then exit I get an error that says the table cannot be updated because it will create a duplicate values in the index, primary key or relationship.

The primary key for this table is CustomerID (autonumber) and it is related to workorders form. I cannot change this primary key.

Sorry to be so long winded. Wanted to ensure all the information was here.

Thanks in advance,

Jeannie
 
Firstly the combo is a CONTROL not a field.

Secondly - leave the form alone.
Set the LOCKED property of each of the text boxes that you want to 'display' date in to TRUE ( Yes ) and you will have done the job.



'ope-that-'elps.




G LS
spsinkNOJUNK@yahoo.co.uk
Remove the NOJUNK to use.
 
The combo should be unbound if you want to use it as a search tool.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Sorry for the typo

I meant
want to 'display' data in to TRUE ( Yes )


And as for
"I don't have a field that displays the date."

Well No. no one does
Things that display information are called CONTROLS
Fields only exist within tables and therefore should never be seen by the user.







G LS
spsinkNOJUNK@yahoo.co.uk
Remove the NOJUNK to use.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top