A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

transfer a field using button



 
 
Thread Tools Display Modes
  #1  
Old May 30th, 2010, 06:56 PM posted to microsoft.public.access
Emma
external usenet poster
 
Posts: 493
Default transfer a field using button

Hi I have a button which opens a form called Second Form; this form has a
client ID and the main form also has a client ID. When I create a new form,
it gives me a client ID however what I want is the client ID to be generated
from the first form. HEre's the code generated:

Private Sub Ctl1Y_Form_Click()
On Error GoTo Err_Ctl1Y_Form_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Second Form"

stLinkCriteria = "[Client ID]=" & "'" & Me![Client ID] & "'"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Ctl1Y_Form_Click:
Exit Sub

Err_Ctl1Y_Form_Click:
MsgBox Err.Description
Resume Exit_Ctl1Y_Form_Click

End Sub

Can anyone show me how to get the second form's data based on client ID?
 




Thread Tools
Display Modes

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 Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:50 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.