simple query and form question

F

ferde

I am using access 2003 . I have one table that has 10 yes/no questions and
two date fields. Time of arrival and time of departure. I just learned how
to make a form from a simple query. The form worked well until I added a
field to my query which calculates the date difference in hours from time of
arrival to time of departure. Now I can no longer do data entry in my form.
Can someone point me in the right direction on how I might do this? I would
like my form to have the ability to calculate the number of hours from time
of arrival to time of departure and also have the yes/ no controls . I
have a book I can use for reference but I am not even sure what to look
under...any help would be greatly appreciated.
 
S

Sninkle

It is recommended when doing calculations based no data, to just create an
unbound text box on your form and enter the formula there.

If you are calculating the number of hours between arrival and departure, do
these extend over 24 hrs? Ex. Arrive Oct 17 Depart Oct 23
 
F

ferde

yes it does extend over 24 hours and thank you for responding. Can you tell
me how I would create an unbound text box on my form?
 
F

ferde

Thank you.. with your help I was able to find the answer in my book on how to
make an unbound text box with a formula.

Many thanks
 
S

Sninkle

With your form open in Design mode, select the text box option from the
toolbar) it should like like ab|). Put it on your form. Select the text box
and type in this formula:

*as I do not know your field names I am using Arrival and Depart in the
example. Change them to whatever you actually named those fields.

=DateDiff("h",[Arrival],[Depart])

the "h" tells it to use hours, if you want days instead use "d"
 
F

ferde

It works great... if I could ask you one more question. I have been trying
to increase the size of my check box on my form so it will be easier for
people to see. I thought I would do this under the properties section of the
yes/no control but when I increase the height and width the check mark stays
the same ???

Sninkle said:
With your form open in Design mode, select the text box option from the
toolbar) it should like like ab|). Put it on your form. Select the text box
and type in this formula:

*as I do not know your field names I am using Arrival and Depart in the
example. Change them to whatever you actually named those fields.

=DateDiff("h",[Arrival],[Depart])

the "h" tells it to use hours, if you want days instead use "d"


--
Carrie


ferde said:
yes it does extend over 24 hours and thank you for responding. Can you tell
me how I would create an unbound text box on my form?
 
J

John W. Vinson

I have been trying
to increase the size of my check box on my form so it will be easier for
people to see.

Unfortunately a textbox control only comes in the one size... you can't change
it.

It's a bit of a pain but you can use a Textbox bound to the yes/no field and
write some code to have it respond to click events like a checkbox.
 

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

Top