Microsoft SQL Server
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsDatabasesMicrosoft SQL Server

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old July 19th, 2003, 05:33 AM
ahmedsoliman ahmedsoliman is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 4 ahmedsoliman User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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]

Reply With Quote
  #2  
Old August 13th, 2003, 04:41 AM
jdarwin jdarwin is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 7 jdarwin User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsDatabasesMicrosoft SQL Server > link to subform


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT