On a simple form: I'd like to build an expression that when a command button is clicked that a pre-defined value (text or #) would populate in the approp. field in the underlaying record source table when the record is complete.
Thank You
On a simple form: I'd like to build an expression that when a command button is clicked that a pre-defined value (text or #) would populate in the approp. field in the underlaying record source table when the record is complete.
Thank You
In the click event of the button:
Me.BoundTextboxName = "Your text here"
or
Me.BoundTextboxName = 12345
I did this previously but nowe can't figure out how to link the command button to the specific field in the table where the "text" will be placed.
The form is set up with the table as the record source, but in the properties for the command button on the data tab I am not given the option to enter control source.
The "BoundTextboxName" in my example was meant to refer to a textbox on your form that was bound to the target field.
I got it. Thank You ! I have seen the light instead of asking the command button to enter data directly into the underlying table, I am having it enter the data into a a bound text box on the form (which is not visible to the User). Thank you for the VBA script.![]()
No problem. You could go directly to the table, but since the form is bound to the table it's much easier to do it through the form.
Hi Guys
not worked on Access UI for a long time and im now currently working on a new file,
i need to be able to populate a table cell from the click of a command button, i tried the above answer but i guess im missing something
Please help
thanks
Part of what you're missing is an example of what you tried and a description what went wrong.![]()
what i tried was
Me.txtvisiting = "Staff Name"
i also tried
frmdetailsin.txtvisiting="staff name"
the error i get was a Run Time Error '424' Object required
with the entire sentence highlighted on the debug
The second isn't valid syntax, but I would expect the first to work. Can you post the db?
the DB is 16mb so to big to send
Can you export this form and whatever it needs to run into a new db? That is the correct name of the textbox, right?