Does #Name appear? when I give a text box a default value in Access

0

I have a form in which I have a text field where the user's work date is entered, which by default I would like it to show the date of the current day. Investigating on the internet I found the function "Date ()" that does just that.

The problem is that when I'm going to put this function on the default value of my text box and try to see my form in form view I get the message "#Name?" instead of the date.

Why is this? Or will it be that the Date () function can not be handled here?

It's very strange because this same function had already been used in another form with the same intention and if it had worked without problems that time.

    
asked by Luis Gastelum 01.02.2018 в 19:53
source

1 answer

0

This error can be due to several causes:

1) The name of your textbox is the same as your field. It seems silly, but many times this error simply by changing the name of the textbox to TXTfieldname, fieldname being the name of the associated field.

2) Make sure that the Origin of Control property is correct, and you have it correctly linked to the field you are interested in.

3) When naming fields in tables, queries, forms and reports, try to avoid using words that are reserved for the system such as Date, Name, and things like that. It is much better to use field names like ThisDate or MyDate or MyName and then with the title property or with labels on forms you leave it nice and with a text more suitable for the user.

4) In your question you say " ... in which I have a text field where the date is entered ... ". If the data type is Text, change it to Date / time, to see if the Fecha()

function recognizes you as a default value

My answers are very vague, but try to see if they solve your problem.

    
answered by 04.02.2018 в 03:28