Assign textbox Default Value to another textbox in Forms

Anonymous
2021-04-24T22:52:10+00:00

Hi,

I work as data entry and I have a lot of papers needs to be done, so I am trying to make my work smart as much as I can,

I have Form link to a Document table, and I have for example 2 fields I want to make default value textbox for them, this will helps me a lot becuse I do not want to repeat write them again and again, so plz help me to link this default value textbox with another fildes

txtBoxNum Link to  txtBoxDefultValue

txtBoxFolderNum Link to txtFolderDefaultValue

Kindly, use Expression Builder or Macros or Query

I will show you what I did but it does not work, I open the [Box Number] proprieties and in Default value expression builder I typed

=txtBoxDefultValue

[Folder Number] proprieties

=txtFolderDefaultValue

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. ScottGem 68,780 Reputation points Volunteer Moderator
    2021-04-25T18:23:50+00:00

    You need to use the Set Value Macro Action. In the property dialog select the OnCurrent event and then open the Macro Builder. Make sure you select to show All Actions. Then select the Set Value action. In the Item box type the name of the control you want to assign a value to. Then in the expression box select the control you are pulling the value from. 

    Ex:

    Set Value

    Item = [City]

    Expression = [DefaultCity]

    1 person found this answer helpful.
    0 comments No comments
Answer accepted by question author
  1. DBG 11,531 Reputation points Volunteer Moderator
    2021-04-25T14:48:44+00:00

    Hi

    Ok do it in VBA and I will try to do it by Macro

    Plz indeed

    Well, okay, see if this works for you.

    In the AfterUpdate event of txtBoxDefaultValue, try:

    Me.txtBoxNum.DefaultValue = """" & Me.txtBoxDefaultValue & """"

    In the AfterUpdate event of txtFolderDefaultValue, try:

    Me.txtFolderNum.DefaultValue = """" & Me.txtFolderDefaultValue & """"

    Hope that helps...

    1 person found this answer helpful.
    0 comments No comments

10 additional answers

Sort by: Most helpful
  1. DBG 11,531 Reputation points Volunteer Moderator
    2021-04-25T00:52:56+00:00

    Hi. I suppose it's possible using a macro, but you might as well get started with VBA since this is a simple one. Is that okay?

    0 comments No comments
  2. Anonymous
    2021-04-25T01:05:11+00:00

    Hi my VBA at work is blocked, only Expression Builder,Macros and Query are working. I really appreciate your help and support. Plz

    0 comments No comments
  3. Anonymous
    2021-04-25T06:14:48+00:00

    Hi

    Ok do it in VBA and I will try to do it by Macro

    Plz indeed

    0 comments No comments