By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,284 Members | 1,697 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,284 IT Pros & Developers. It's quick & easy.

Link record beween forms

P: 8
Hi,
I have two forms based on the underlying table. One is a data entry, and the other is a continuous form based on some searching criteria.

Now I want to add "edit" button to each record in the continuous form. This button could bring user to the appropriate record in the data entry form.

How could I do that?

Thanks.
Nov 28 '06 #1
Share this Question
Share on Google+
3 Replies


MMcCarthy
Expert Mod 10K+
P: 14,534
Hi,
I have two forms based on the underlying table. One is a data entry, and the other is a continuous form based on some searching criteria.

Now I want to add "edit" button to each record in the continuous form. This button could bring user to the appropriate record in the data entry form.

How could I do that?

Thanks.
Data Entry implies that the form is set to add a new record only. If not then just put an 'edit' button on the form footer and have it open the other form with criteria set to current record as follows:

Expand|Select|Wrap|Line Numbers
  1.  
  2. Private Sub cmdEdit_Click()
  3. Dim stDocName As String
  4. Dim stLinkCriteria As String
  5.  
  6.    stDocName = "Name of Data Entry Form"
  7.    stLinkCriteria = "[UniqueID]=" & Me.UniqueID
  8.  
  9.    DoCmd.OpenForm stDocName, , ,stLinkCriteria
  10.  
  11. End Sub
  12.  
Nov 28 '06 #2

P: 8
Thanks a lot for your reply. It works now.


Data Entry implies that the form is set to add a new record only. If not then just put an 'edit' button on the form footer and have it open the other form with criteria set to current record as follows:

Expand|Select|Wrap|Line Numbers
  1.  
  2. Private Sub cmdEdit_Click()
  3. Dim stDocName As String
  4. Dim stLinkCriteria As String
  5.  
  6.    stDocName = "Name of Data Entry Form"
  7.    stLinkCriteria = "[UniqueID]=" & Me.UniqueID
  8.  
  9.    DoCmd.OpenForm stDocName, , ,stLinkCriteria
  10.  
  11. End Sub
  12.  
Nov 29 '06 #3

MMcCarthy
Expert Mod 10K+
P: 14,534
Thanks a lot for your reply. It works now.
You're welcome.
Nov 29 '06 #4

Post your reply

Sign in to post your reply or Sign up for a free account.