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 » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Read value from subform



 
 
Thread Tools Display Modes
  #1  
Old May 16th, 2005, 04:48 PM
A.J.M. van Rijthoven
external usenet poster
 
Posts: n/a
Default Read value from subform

I have a form (net) with a subform(foto) with the field fotolocatie
The data in this field contains the directory and name of a
photograph, linked to the database.
On this subform is also a button so that I can print out the
photograph.
When the button is clicked, it opens a new form. The title of this
form is data that is taken from the mainform(net). That's no problem
But the data for loading the picture must be taken from the
fotolocatie-field on the subform.
Me.fotoafbeelding.Picture = Forms!frmfoto.fotolocatie

MSAccess gives an error that it can't find the subform.
What is the solution for this problem??

  #2  
Old May 16th, 2005, 06:59 PM
Gwhit
external usenet poster
 
Posts: n/a
Default

Hi,

Try me.fotoafbeelding.picture = forms!net!foto.form![fotolocatie]

I am basing my code on your indication that the parent form name is simply
called net and the subform is simply called foto. if you use the "frm"
phrase in front of either of your actual form/subform names, then it would
need to be included in the code as well.

"A.J.M. van Rijthoven" wrote:

I have a form (net) with a subform(foto) with the field fotolocatie
The data in this field contains the directory and name of a
photograph, linked to the database.
On this subform is also a button so that I can print out the
photograph.
When the button is clicked, it opens a new form. The title of this
form is data that is taken from the mainform(net). That's no problem
But the data for loading the picture must be taken from the
fotolocatie-field on the subform.
Me.fotoafbeelding.Picture = Forms!frmfoto.fotolocatie

MSAccess gives an error that it can't find the subform.
What is the solution for this problem??


 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't find Master Link and Child Link Attributes Laurel New Users 20 February 24th, 2005 04:29 PM
subform's field and corresponding recordset out of sync? AB General Discussion 3 November 8th, 2004 10:54 PM
making a form & subform read / write JulieD Using Forms 2 August 9th, 2004 06:57 AM
Can't figger this'un out. Jerry Running & Setting Up Queries 7 July 7th, 2004 06:12 AM
Need help with cascading combos Tom Using Forms 19 July 1st, 2004 11:11 PM


All times are GMT +1. The time now is 09:46 PM.


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