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  

Adding a value to a field that is not on a form



 
 
Thread Tools Display Modes
  #1  
Old September 23rd, 2009, 11:44 PM posted to microsoft.public.access.forms
paduanow
external usenet poster
 
Posts: 20
Default Adding a value to a field that is not on a form

I open a form that has 3 fields

I have a "save" command button. On Click, I want to add "IC" to a field
that is not displayed on the form before I go to the next record. The user
is not aware of this value and unique by the form they select. The form they
select determines the type of transaction and sets a transaction code the
requested that is used later.


I tried Form![formname]![fieldname].Value = "IC"
Unless the fieldname is on the form this does not work.
I tried [tablename]![fieldname].Value = "IC"
and this did not work either.

--
pad
  #2  
Old September 24th, 2009, 12:59 AM posted to microsoft.public.access.forms
Dorian
external usenet poster
 
Posts: 542
Default Adding a value to a field that is not on a form

On the form, add a control bound to the column and make the visible property
= false.
Then you can set the fields value using:
Me![Hiddenfieldname] = "IC"
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".


"paduanow" wrote:

I open a form that has 3 fields

I have a "save" command button. On Click, I want to add "IC" to a field
that is not displayed on the form before I go to the next record. The user
is not aware of this value and unique by the form they select. The form they
select determines the type of transaction and sets a transaction code the
requested that is used later.


I tried Form![formname]![fieldname].Value = "IC"
Unless the fieldname is on the form this does not work.
I tried [tablename]![fieldname].Value = "IC"
and this did not work either.

--
pad

 




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 07:09 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.