add function results to the table field using a form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a function - fGetUNCPath(Left$([Photo],2)) & Mid$([Photo],3)
I would like to use the form fP5ProjectPlanEdit to mput the results from the
function into the SchedUNC field in the tSchedImages table

The form uses the office file open idalog to choose a photo image for the
current record.
The function is used to return the UNC path to Photo image.

How can I add the function results to the field in my table?

Thanks in advance!!
 
Assuming your form is a bound form and the form's recordset includes the
field SchedUNC,
Add a text box control to your form and make its control source property
SchedUNC
Exactly when and how you will execute the function, I don't know, because I
don't know how your form works. It may be as simple as making the function
the default value of the control.
 
I set the textbox control source to SchedUNC, now how do I run the function
and get the value in the SchedUNC text box. I wnat it to run in the
afterupdate.


--
deb


Klatuu said:
Assuming your form is a bound form and the form's recordset includes the
field SchedUNC,
Add a text box control to your form and make its control source property
SchedUNC
Exactly when and how you will execute the function, I don't know, because I
don't know how your form works. It may be as simple as making the function
the default value of the control.
--
Dave Hargis, Microsoft Access MVP


deb said:
I have a function - fGetUNCPath(Left$([Photo],2)) & Mid$([Photo],3)
I would like to use the form fP5ProjectPlanEdit to mput the results from the
function into the SchedUNC field in the tSchedImages table

The form uses the office file open idalog to choose a photo image for the
current record.
The function is used to return the UNC path to Photo image.

How can I add the function results to the field in my table?

Thanks in advance!!
 
Which After Update?
But, in any case,

Me.TheTextBox = fGetUNCPath(Left$(Me.[Photo],2)) & Mid$(Me.[Photo],3)

Note, I assume [Photo] is a control on the form.
Always qualify your objects.
--
Dave Hargis, Microsoft Access MVP


deb said:
I set the textbox control source to SchedUNC, now how do I run the function
and get the value in the SchedUNC text box. I wnat it to run in the
afterupdate.


--
deb


Klatuu said:
Assuming your form is a bound form and the form's recordset includes the
field SchedUNC,
Add a text box control to your form and make its control source property
SchedUNC
Exactly when and how you will execute the function, I don't know, because I
don't know how your form works. It may be as simple as making the function
the default value of the control.
--
Dave Hargis, Microsoft Access MVP


deb said:
I have a function - fGetUNCPath(Left$([Photo],2)) & Mid$([Photo],3)
I would like to use the form fP5ProjectPlanEdit to mput the results from the
function into the SchedUNC field in the tSchedImages table

The form uses the office file open idalog to choose a photo image for the
current record.
The function is used to return the UNC path to Photo image.

How can I add the function results to the field in my table?

Thanks in advance!!
 
Back
Top