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

subform ?

Status
Not open for further replies.

tweetyng

MIS
Feb 23, 2006
46
US
hi
i have a main form linked with subform, in the subform I would like to show all 27 records, how can I do it? please help?

Example:

Main form:

CustomerID (auto-number) : 12545

Subform: (link with customer ID) (continuous form)

Violations Score CustomerID
1 5 12545
12 4 12545

If you enter each violation # (from 1 to 27), each viloation # is one record, then it's working fine, but you have to enter 27 times. So I would like to insert all 27 violation # (27 records) when you just enter violation #1 in the form or any other easy way to do. Is it impossible to insert like this? Please help
Thanks
 
It should be possible to use an append query. First, create a table with 27 violations, but no customer ID. This will be your template file. Create a query to add these records to your database, something like this:

[tt]INSERT INTO tblCustomers ( ViolationNo, CustomerID )
SELECT tblViolations.ViolationNumber, [Forms]![Form20]![txtCustomerID] AS Expr1
FROM tblViolations;[/tt]

Finally, add a command button to run your query. Don't forget to requery the subform.

PS It is generally better to choose a more descriptive title for your thread. It will attract more attention.
 
Thanks Remou, I got it figured out. It worked. Once thanks alots

TN (USA). I'm using Windows XP, Crystal Reports 11 and SQL Server
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top