|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
link to subform
now i rebuild masome forms in my system (access ver2).
-my main form contain 2 subform -first sub form is a grid browse all customer's code&name from "customer" table -second subform contain 2 textboxes (city,address) get their data from "customer" table -i want when click on specific customer record his city and address displayed in the seconed subform in the text boxes. my question is how to perform this action in easy way? i think i should use "on current" properties also i think this code will be helpfull: ----------------------------------------------------------------------- Kryterium = "CODE = '" & Me![Code] & "'" 'Debug.Print Kryterium Set MyRset = Forms![frmCUSTOMERSMain].RecordsetClone MyRset.FindFirst Kryterium If MyRset.NoMatch Then DoCmd GoToRecord , , A_NEWREC Else Forms![frmCUSTOMERSMain].Form.Bookmark = MyRset.Bookmark End If CustClass = Forms![frmCUSTOMERSMain]![CLASS_CODE] |
|
#2
|
|||
|
|||
|
Hi,
You should create relationship between the Customers Master (1 side) and the Customer Details (Many side) as one-to-many. In Access 2000 go to Tool -> Relationships option on the menu bar for this. FORM 1: The form attached to the Customer master (1 side) should display one record at a time. FORM 2: Second form attached to the Customer Details (many side) should display multiple matching records from the Customer Master table primary key. Now open FORM 1 in design view. Open Access database objects window, select Forms, then drag and drop it to the FORM 1, Detail section. Then rearrange and reposition accordingly. Save FORM 1 and open it. Now since you have already defined the relationship, the sub form (FORM 2) will display records matching from the Customer Master. John |
![]() |
| Viewing: Dev Articles Community Forums > Databases > Microsoft SQL Server > link to subform |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|