Datasheet field names

J

juicegully

Hi,

I have two questions:
1. When I go to datasheet view, the names of my fields are the names of my
controls. In the query design (the query is the form's record source), an
example of a field name is "#Yrs: ConvertToYrs([Num])". On my form, the
control txtYrs is bound to "#Yrs" but when I go to Datasheet view, i see
"txtYrs". How can I change this?

2. I've seen a lot of questions on how to switch a subform to datasheet
view and back, but if I'm not using a subform, how does this work? I have a
button on my form to go to datasheet view, but no button (obviously) to get
back to form view.

Thanks
 
O

Ofer

1. Link a lable to the field, that way the name of the field will be the
caption of the lable.
when you select a lable to be inserted in the form, click on the field
instead of clicking on the form.

2. Create a tool bar that include a button that will change the view, from
datasheet to form view and back.
 
J

juicegully

Hi Ofer,

I'm on #1 right now. I selected the label tool and then clicked on the text
box instead of the form but the label doesn't connect to the text box. Also,
my labels for my textbox are in the form header and the text boxes are in the
Detail section so can the label still connect to the text box?

I'm going to work on #2 soon.

Thanks for the quick reply.


Ofer said:
1. Link a lable to the field, that way the name of the field will be the
caption of the lable.
when you select a lable to be inserted in the form, click on the field
instead of clicking on the form.

2. Create a tool bar that include a button that will change the view, from
datasheet to form view and back.


juicegully said:
Hi,

I have two questions:
1. When I go to datasheet view, the names of my fields are the names of my
controls. In the query design (the query is the form's record source), an
example of a field name is "#Yrs: ConvertToYrs([Num])". On my form, the
control txtYrs is bound to "#Yrs" but when I go to Datasheet view, i see
"txtYrs". How can I change this?

2. I've seen a lot of questions on how to switch a subform to datasheet
view and back, but if I'm not using a subform, how does this work? I have a
button on my form to go to datasheet view, but no button (obviously) to get
back to form view.

Thanks
 
J

juicegully

Hi,

I just figured out how to attach a label to a text box if they're in the
same section (header/detail/footer) but it doesn't seem as easy when they're
in different sections.

juicegully said:
Hi Ofer,

I'm on #1 right now. I selected the label tool and then clicked on the text
box instead of the form but the label doesn't connect to the text box. Also,
my labels for my textbox are in the form header and the text boxes are in the
Detail section so can the label still connect to the text box?

I'm going to work on #2 soon.

Thanks for the quick reply.


Ofer said:
1. Link a lable to the field, that way the name of the field will be the
caption of the lable.
when you select a lable to be inserted in the form, click on the field
instead of clicking on the form.

2. Create a tool bar that include a button that will change the view, from
datasheet to form view and back.


juicegully said:
Hi,

I have two questions:
1. When I go to datasheet view, the names of my fields are the names of my
controls. In the query design (the query is the form's record source), an
example of a field name is "#Yrs: ConvertToYrs([Num])". On my form, the
control txtYrs is bound to "#Yrs" but when I go to Datasheet view, i see
"txtYrs". How can I change this?

2. I've seen a lot of questions on how to switch a subform to datasheet
view and back, but if I'm not using a subform, how does this work? I have a
button on my form to go to datasheet view, but no button (obviously) to get
back to form view.

Thanks
 
J

John Vinson

Hi,

I have two questions:
1. When I go to datasheet view, the names of my fields are the names of my
controls. In the query design (the query is the form's record source), an
example of a field name is "#Yrs: ConvertToYrs([Num])". On my form, the
control txtYrs is bound to "#Yrs" but when I go to Datasheet view, i see
"txtYrs". How can I change this?

2. I've seen a lot of questions on how to switch a subform to datasheet
view and back, but if I'm not using a subform, how does this work? I have a
button on my form to go to datasheet view, but no button (obviously) to get
back to form view.

Thanks

Try setting the Caption property of the table field to the name you
want shown.

John W. Vinson[MVP]
 
J

juicegully

Thanks, but this didn't seem to help! In datasheet view, I'm still seeing the
names of my controls.

John Vinson said:
Hi,

I have two questions:
1. When I go to datasheet view, the names of my fields are the names of my
controls. In the query design (the query is the form's record source), an
example of a field name is "#Yrs: ConvertToYrs([Num])". On my form, the
control txtYrs is bound to "#Yrs" but when I go to Datasheet view, i see
"txtYrs". How can I change this?

2. I've seen a lot of questions on how to switch a subform to datasheet
view and back, but if I'm not using a subform, how does this work? I have a
button on my form to go to datasheet view, but no button (obviously) to get
back to form view.

Thanks

Try setting the Caption property of the table field to the name you
want shown.

John W. Vinson[MVP]
 
R

Ronald Roberts

juicegully said:
Hi,

I have two questions:
1. When I go to datasheet view, the names of my fields are the names of my
controls. In the query design (the query is the form's record source), an
example of a field name is "#Yrs: ConvertToYrs([Num])". On my form, the
control txtYrs is bound to "#Yrs" but when I go to Datasheet view, i see
"txtYrs". How can I change this?

2. I've seen a lot of questions on how to switch a subform to datasheet
view and back, but if I'm not using a subform, how does this work? I have a
button on my form to go to datasheet view, but no button (obviously) to get
back to form view.

Thanks

1. Make 2 copies of your form. I will call them Form1 and Form2.
2. In form1 delete all of the controls in the detail section.
3. Make Form1 an unbound form.
4. In Form1 in the header section change your form view button so it
will check the View of the Form2 and change it to the other view.
So if form2 is in single form view, change it to datasheet. If it is
in datasheet, change it to single form view.
5. In form2 attach all of the labels to the correct controls in the
detail section. Select a label and hit ctl-x then select the correct
control and hit ctl-v.
6. In form2 remove the header and footer section.
7. Arrange your controls in form2 the way you need them.
8. Make sure the tab order in form2 is correct.
9. Add a SubForm to Form1 for form2.

All of the controls in the header section of form1 will be unbound, so
you will need to add code for any functions or features you need in the
header.

In my application I do it this way, but i do not change the view of the
subform.

HTH,

Ron
ps: this is off the top of my head, I may have missed something, so
don't delete your original form until you are satisfied.
 
O

Ofer

Sorry for the delay, if you want datasheet view, there is no point to have
the lable in a different section.
If that the case change the name of the text box to something meaningful.

juicegully said:
Hi,

I just figured out how to attach a label to a text box if they're in the
same section (header/detail/footer) but it doesn't seem as easy when they're
in different sections.

juicegully said:
Hi Ofer,

I'm on #1 right now. I selected the label tool and then clicked on the text
box instead of the form but the label doesn't connect to the text box. Also,
my labels for my textbox are in the form header and the text boxes are in the
Detail section so can the label still connect to the text box?

I'm going to work on #2 soon.

Thanks for the quick reply.


Ofer said:
1. Link a lable to the field, that way the name of the field will be the
caption of the lable.
when you select a lable to be inserted in the form, click on the field
instead of clicking on the form.

2. Create a tool bar that include a button that will change the view, from
datasheet to form view and back.


:

Hi,

I have two questions:
1. When I go to datasheet view, the names of my fields are the names of my
controls. In the query design (the query is the form's record source), an
example of a field name is "#Yrs: ConvertToYrs([Num])". On my form, the
control txtYrs is bound to "#Yrs" but when I go to Datasheet view, i see
"txtYrs". How can I change this?

2. I've seen a lot of questions on how to switch a subform to datasheet
view and back, but if I'm not using a subform, how does this work? I have a
button on my form to go to datasheet view, but no button (obviously) to get
back to form view.

Thanks
 
Top