form problem with date field

  • Thread starter Thread starter stephan
  • Start date Start date
S

stephan

Hi,

I have form based on a query.
The fields are Date - Time and Name.
By opening the query the user has to give a date.
I putted the Date-field in the header of the form.

When I open the form, I can see all appointments of that day, but when I
want to add a new appointment, the date field is blanc.
How can I force to use the date given by opening the form.

thx
stephan
 
Your question is unclear. Are you passing the date value from the main form
to a subform? You mention "all the appointments of that day". Are those
appointments separate records? What tables are involved, and how are they
related?
 
this is the situation :

I have a table with the fields date , time and name.
Name is from another table.
I want for 1 date to fill in only the time and name for each new record.
Until now I have to type the date and time and name.
Is this clear ?
 
You should avoid using Date, Time, and Name as field names. For a listing
of reserved words see:
http://support.microsoft.com/default.aspx?scid=kb;en-us;209187
and http://office.microsoft.com/en-us/assistance/HP011353121033.aspx

I don't know what you mean by "name is from another table". If it is in
another table you probably shouldn't be storing it again. Are the two
tables related?

If you want to add the date and time a record was created, you can use the
default property of the control (text box) that is bound to the field.
Click the text box to select it, then click View > Properties. Click the
Data tab, and enter =Date() as the Default Value for the date field and
=Now() for the time field.
 
I give more information. The names of the fields are different. I use
Dat_beh (date-field) Uur (Time-field) and Patientname (Name-field). The
name-field is from another table which is related to the table with the date
and time field.
The solution you mentioned, I use now for the form but I want to use the
date I give by opening the form. Because most of the time I have to fill the
form several days after current date.
 
You have mentioned "the date I give by opening the form". What date is
that?

If it helps, you can change the date field or time field after the default
value has been added. The default value is only when the record is new.
Youc an change the date to whatever you need.
 
The form depends on a query. In the query is a criteria : [Give date]. And
that is the i want to use for new appointments.
I use now the solution you gave in the previous message.
It seems there is no solution for my problem.
 
A criteria means that you will see only records that match that criteria.
If the criteria for a field is a date, you will see only records that have
the same date.
There seems to be a language barrier here. There are newsgroups in many
languages, and Access experts in many places. I do not know if your problem
has a solution because I do not understand the problem. If you go to the
Microsoft web site, or to Google groups, I believe you will be able to find
help in your preferred language. Good luck.

stephan said:
The form depends on a query. In the query is a criteria : [Give date]. And
that is the i want to use for new appointments.
I use now the solution you gave in the previous message.
It seems there is no solution for my problem.


BruceM said:
You have mentioned "the date I give by opening the form". What date is
that?

If it helps, you can change the date field or time field after the
default value has been added. The default value is only when the record
is new. Youc an change the date to whatever you need.
 
Thanks for your efforts


BruceM said:
A criteria means that you will see only records that match that criteria.
If the criteria for a field is a date, you will see only records that have
the same date.
There seems to be a language barrier here. There are newsgroups in many
languages, and Access experts in many places. I do not know if your
problem has a solution because I do not understand the problem. If you go
to the Microsoft web site, or to Google groups, I believe you will be able
to find help in your preferred language. Good luck.

stephan said:
The form depends on a query. In the query is a criteria : [Give date].
And that is the i want to use for new appointments.
I use now the solution you gave in the previous message.
It seems there is no solution for my problem.


BruceM said:
You have mentioned "the date I give by opening the form". What date is
that?

If it helps, you can change the date field or time field after the
default value has been added. The default value is only when the record
is new. Youc an change the date to whatever you need.

I give more information. The names of the fields are different. I use
Dat_beh (date-field) Uur (Time-field) and Patientname (Name-field). The
name-field is from another table which is related to the table with the
date and time field.
The solution you mentioned, I use now for the form but I want to use
the date I give by opening the form. Because most of the time I have to
fill the form several days after current date.


You should avoid using Date, Time, and Name as field names. For a
listing of reserved words see:
http://support.microsoft.com/default.aspx?scid=kb;en-us;209187
and http://office.microsoft.com/en-us/assistance/HP011353121033.aspx

I don't know what you mean by "name is from another table". If it is
in another table you probably shouldn't be storing it again. Are the
two tables related?

If you want to add the date and time a record was created, you can use
the default property of the control (text box) that is bound to the
field. Click the text box to select it, then click View > Properties.
Click the Data tab, and enter =Date() as the Default Value for the
date field and =Now() for the time field.

this is the situation :

I have a table with the fields date , time and name.
Name is from another table.
I want for 1 date to fill in only the time and name for each new
record. Until now I have to type the date and time and name.
Is this clear ?
Your question is unclear. Are you passing the date value from the
main form to a subform? You mention "all the appointments of that
day". Are those appointments separate records? What tables are
involved, and how are they related?

Hi,

I have form based on a query.
The fields are Date - Time and Name.
By opening the query the user has to give a date.
I putted the Date-field in the header of the form.

When I open the form, I can see all appointments of that day, but
when I want to add a new appointment, the date field is blanc.
How can I force to use the date given by opening the form.

thx
stephan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top