Problem with default value updating table

G

Guest

I am having a problem setting the default value for a text box in a form. I
have 8 forms; each form applies to a certain category name. I want a text
box in the form to have a default value of the category name, so that the
user does not have to type anything it will just populate to the categoryname
field in the table, I am going to lock the field so it can not be changed.
When I set the default value property for the textbox inside the form design
view, nothing shows up (in the form or in the table) No matter what I try I
keep getting blank values in the categoryname field.
I can't set the default value in the Table Design because it has multiple
values.
I'm not for sure if this makes sense or if I have a bad design idea, I am
fairly new to access. Any help would be greatly appreciated
 
G

Guest

In design View click on the field you want to have the default value. and
look at the properties and find the Default value property and add the value
you want.
 
G

Guest

I have tried to do that in the form's design view, I simply type in the text
I want into the default value box, surrounded by quotes, but nothing shows up
in the text box when i go to data entry mode, and nothing is entered into the
field in the table unless I manually type it in. I can enter the default
value in the table design view and I need it entered into a specific form
because each form has a different default value for that text box
 
G

Guest

I was assuming you were doing this on a new record. In design view go to the
forms On Current Event and create a new procedure to look like this

Private Sub Form_Current()

Me.Test = "Test"

End Sub

where me.Test equals your fields name
 
G

Guest

Very stupid question here. I'm new to this. what does the me. stand for?
I see it in almost all the replies
thanks
 
G

Guest

Another dumb question, Im not so great with VB, what if there are spaces how
do you let vb now that it is one string of characters
 
G

Guest

Hi Omaha,

The Me. refers to the current form saves having to type
Forms!.FormName.Control to reference each control on the current form.

To let VB or SQL know there are spaces enclose the field or control name
with [] eg; Me.[Control Name With Spaces In]

TonyT..
 
G

Guest

Thanks for responding Tony. I appreciate it.
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


TonyT said:
Hi Omaha,

The Me. refers to the current form saves having to type
Forms!.FormName.Control to reference each control on the current form.

To let VB or SQL know there are spaces enclose the field or control name
with [] eg; Me.[Control Name With Spaces In]

TonyT..

OmahaAccess said:
Another dumb question, Im not so great with VB, what if there are spaces how
do you let vb now that it is one string of characters
 
G

Guest

Hi Cyberwolf,

I pick out & answer the really easy questions and leave you clever lot to
concentrate on the hard questions :p

TonyT..

Cyberwolf said:
Thanks for responding Tony. I appreciate it.
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


TonyT said:
Hi Omaha,

The Me. refers to the current form saves having to type
Forms!.FormName.Control to reference each control on the current form.

To let VB or SQL know there are spaces enclose the field or control name
with [] eg; Me.[Control Name With Spaces In]

TonyT..

OmahaAccess said:
Another dumb question, Im not so great with VB, what if there are spaces how
do you let vb now that it is one string of characters


:

I was assuming you were doing this on a new record. In design view go to the
forms On Current Event and create a new procedure to look like this

Private Sub Form_Current()

Me.Test = "Test"

End Sub

where me.Test equals your fields name
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


:

I have tried to do that in the form's design view, I simply type in the text
I want into the default value box, surrounded by quotes, but nothing shows up
in the text box when i go to data entry mode, and nothing is entered into the
field in the table unless I manually type it in. I can enter the default
value in the table design view and I need it entered into a specific form
because each form has a different default value for that text box

:

In design View click on the field you want to have the default value. and
look at the properties and find the Default value property and add the value
you want.
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


:

I am having a problem setting the default value for a text box in a form. I
have 8 forms; each form applies to a certain category name. I want a text
box in the form to have a default value of the category name, so that the
user does not have to type anything it will just populate to the categoryname
field in the table, I am going to lock the field so it can not be changed.
When I set the default value property for the textbox inside the form design
view, nothing shows up (in the form or in the table) No matter what I try I
keep getting blank values in the categoryname field.
I can't set the default value in the Table Design because it has multiple
values.
I'm not for sure if this makes sense or if I have a bad design idea, I am
fairly new to access. Any help would be greatly appreciated
 
G

Guest

Thanks all for responding. I definetly appreciate the help.
I tried typing [SSO - Reached Waters of State].CategoryName = "Test" in the
on current event in the form properties. When I opened the form it gave me
an error - "Run-time error '2465': Microsoft Access can't find the field
'l' referred to in your expression. Any ideas?

TonyT said:
Hi Cyberwolf,

I pick out & answer the really easy questions and leave you clever lot to
concentrate on the hard questions :p

TonyT..

Cyberwolf said:
Thanks for responding Tony. I appreciate it.
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


TonyT said:
Hi Omaha,

The Me. refers to the current form saves having to type
Forms!.FormName.Control to reference each control on the current form.

To let VB or SQL know there are spaces enclose the field or control name
with [] eg; Me.[Control Name With Spaces In]

TonyT..

:

Another dumb question, Im not so great with VB, what if there are spaces how
do you let vb now that it is one string of characters


:

I was assuming you were doing this on a new record. In design view go to the
forms On Current Event and create a new procedure to look like this

Private Sub Form_Current()

Me.Test = "Test"

End Sub

where me.Test equals your fields name
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


:

I have tried to do that in the form's design view, I simply type in the text
I want into the default value box, surrounded by quotes, but nothing shows up
in the text box when i go to data entry mode, and nothing is entered into the
field in the table unless I manually type it in. I can enter the default
value in the table design view and I need it entered into a specific form
because each form has a different default value for that text box

:

In design View click on the field you want to have the default value. and
look at the properties and find the Default value property and add the value
you want.
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


:

I am having a problem setting the default value for a text box in a form. I
have 8 forms; each form applies to a certain category name. I want a text
box in the form to have a default value of the category name, so that the
user does not have to type anything it will just populate to the categoryname
field in the table, I am going to lock the field so it can not be changed.
When I set the default value property for the textbox inside the form design
view, nothing shows up (in the form or in the table) No matter what I try I
keep getting blank values in the categoryname field.
I can't set the default value in the Table Design because it has multiple
values.
I'm not for sure if this makes sense or if I have a bad design idea, I am
fairly new to access. Any help would be greatly appreciated
 
G

Guest

What is the [SSO - Reached Waters of State] for. Is this the name of the
table or form. If so just delete that then put me.CategoryName
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


OmahaAccess said:
Thanks all for responding. I definetly appreciate the help.
I tried typing [SSO - Reached Waters of State].CategoryName = "Test" in the
on current event in the form properties. When I opened the form it gave me
an error - "Run-time error '2465': Microsoft Access can't find the field
'l' referred to in your expression. Any ideas?

TonyT said:
Hi Cyberwolf,

I pick out & answer the really easy questions and leave you clever lot to
concentrate on the hard questions :p

TonyT..

Cyberwolf said:
Thanks for responding Tony. I appreciate it.
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


:

Hi Omaha,

The Me. refers to the current form saves having to type
Forms!.FormName.Control to reference each control on the current form.

To let VB or SQL know there are spaces enclose the field or control name
with [] eg; Me.[Control Name With Spaces In]

TonyT..

:

Another dumb question, Im not so great with VB, what if there are spaces how
do you let vb now that it is one string of characters


:

I was assuming you were doing this on a new record. In design view go to the
forms On Current Event and create a new procedure to look like this

Private Sub Form_Current()

Me.Test = "Test"

End Sub

where me.Test equals your fields name
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


:

I have tried to do that in the form's design view, I simply type in the text
I want into the default value box, surrounded by quotes, but nothing shows up
in the text box when i go to data entry mode, and nothing is entered into the
field in the table unless I manually type it in. I can enter the default
value in the table design view and I need it entered into a specific form
because each form has a different default value for that text box

:

In design View click on the field you want to have the default value. and
look at the properties and find the Default value property and add the value
you want.
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


:

I am having a problem setting the default value for a text box in a form. I
have 8 forms; each form applies to a certain category name. I want a text
box in the form to have a default value of the category name, so that the
user does not have to type anything it will just populate to the categoryname
field in the table, I am going to lock the field so it can not be changed.
When I set the default value property for the textbox inside the form design
view, nothing shows up (in the form or in the table) No matter what I try I
keep getting blank values in the categoryname field.
I can't set the default value in the Table Design because it has multiple
values.
I'm not for sure if this makes sense or if I have a bad design idea, I am
fairly new to access. Any help would be greatly appreciated
 
G

Guest

Do this. Copy the info on the OnCurrent event and I will look at it.
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


OmahaAccess said:
Thanks all for responding. I definetly appreciate the help.
I tried typing [SSO - Reached Waters of State].CategoryName = "Test" in the
on current event in the form properties. When I opened the form it gave me
an error - "Run-time error '2465': Microsoft Access can't find the field
'l' referred to in your expression. Any ideas?

TonyT said:
Hi Cyberwolf,

I pick out & answer the really easy questions and leave you clever lot to
concentrate on the hard questions :p

TonyT..

Cyberwolf said:
Thanks for responding Tony. I appreciate it.
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


:

Hi Omaha,

The Me. refers to the current form saves having to type
Forms!.FormName.Control to reference each control on the current form.

To let VB or SQL know there are spaces enclose the field or control name
with [] eg; Me.[Control Name With Spaces In]

TonyT..

:

Another dumb question, Im not so great with VB, what if there are spaces how
do you let vb now that it is one string of characters


:

I was assuming you were doing this on a new record. In design view go to the
forms On Current Event and create a new procedure to look like this

Private Sub Form_Current()

Me.Test = "Test"

End Sub

where me.Test equals your fields name
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


:

I have tried to do that in the form's design view, I simply type in the text
I want into the default value box, surrounded by quotes, but nothing shows up
in the text box when i go to data entry mode, and nothing is entered into the
field in the table unless I manually type it in. I can enter the default
value in the table design view and I need it entered into a specific form
because each form has a different default value for that text box

:

In design View click on the field you want to have the default value. and
look at the properties and find the Default value property and add the value
you want.
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


:

I am having a problem setting the default value for a text box in a form. I
have 8 forms; each form applies to a certain category name. I want a text
box in the form to have a default value of the category name, so that the
user does not have to type anything it will just populate to the categoryname
field in the table, I am going to lock the field so it can not be changed.
When I set the default value property for the textbox inside the form design
view, nothing shows up (in the form or in the table) No matter what I try I
keep getting blank values in the categoryname field.
I can't set the default value in the Table Design because it has multiple
values.
I'm not for sure if this makes sense or if I have a bad design idea, I am
fairly new to access. Any help would be greatly appreciated
 
G

Guest

The SSO - Reached Waters of State is the form name.
Here is a copy of the current event code:

Private Sub Form_Current()

Me.CategoryName = "Test"

End Sub

I got another error - "Compile error: Method or data member not found."

The debugger highlighted: ".CategoryName ="

Thanks


Cyberwolf said:
Do this. Copy the info on the OnCurrent event and I will look at it.
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


OmahaAccess said:
Thanks all for responding. I definetly appreciate the help.
I tried typing [SSO - Reached Waters of State].CategoryName = "Test" in the
on current event in the form properties. When I opened the form it gave me
an error - "Run-time error '2465': Microsoft Access can't find the field
'l' referred to in your expression. Any ideas?

TonyT said:
Hi Cyberwolf,

I pick out & answer the really easy questions and leave you clever lot to
concentrate on the hard questions :p

TonyT..

:

Thanks for responding Tony. I appreciate it.
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


:

Hi Omaha,

The Me. refers to the current form saves having to type
Forms!.FormName.Control to reference each control on the current form.

To let VB or SQL know there are spaces enclose the field or control name
with [] eg; Me.[Control Name With Spaces In]

TonyT..

:

Another dumb question, Im not so great with VB, what if there are spaces how
do you let vb now that it is one string of characters


:

I was assuming you were doing this on a new record. In design view go to the
forms On Current Event and create a new procedure to look like this

Private Sub Form_Current()

Me.Test = "Test"

End Sub

where me.Test equals your fields name
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


:

I have tried to do that in the form's design view, I simply type in the text
I want into the default value box, surrounded by quotes, but nothing shows up
in the text box when i go to data entry mode, and nothing is entered into the
field in the table unless I manually type it in. I can enter the default
value in the table design view and I need it entered into a specific form
because each form has a different default value for that text box

:

In design View click on the field you want to have the default value. and
look at the properties and find the Default value property and add the value
you want.
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


:

I am having a problem setting the default value for a text box in a form. I
have 8 forms; each form applies to a certain category name. I want a text
box in the form to have a default value of the category name, so that the
user does not have to type anything it will just populate to the categoryname
field in the table, I am going to lock the field so it can not be changed.
When I set the default value property for the textbox inside the form design
view, nothing shows up (in the form or in the table) No matter what I try I
keep getting blank values in the categoryname field.
I can't set the default value in the Table Design because it has multiple
values.
I'm not for sure if this makes sense or if I have a bad design idea, I am
fairly new to access. Any help would be greatly appreciated
 
G

Guest

Well I guess the degugger highlighted in yellow the first line in the code
after I clicked OK on the error message. The "Private Sub_Form_Current ()"
line.

Cyberwolf said:
Do this. Copy the info on the OnCurrent event and I will look at it.
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


OmahaAccess said:
Thanks all for responding. I definetly appreciate the help.
I tried typing [SSO - Reached Waters of State].CategoryName = "Test" in the
on current event in the form properties. When I opened the form it gave me
an error - "Run-time error '2465': Microsoft Access can't find the field
'l' referred to in your expression. Any ideas?

TonyT said:
Hi Cyberwolf,

I pick out & answer the really easy questions and leave you clever lot to
concentrate on the hard questions :p

TonyT..

:

Thanks for responding Tony. I appreciate it.
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


:

Hi Omaha,

The Me. refers to the current form saves having to type
Forms!.FormName.Control to reference each control on the current form.

To let VB or SQL know there are spaces enclose the field or control name
with [] eg; Me.[Control Name With Spaces In]

TonyT..

:

Another dumb question, Im not so great with VB, what if there are spaces how
do you let vb now that it is one string of characters


:

I was assuming you were doing this on a new record. In design view go to the
forms On Current Event and create a new procedure to look like this

Private Sub Form_Current()

Me.Test = "Test"

End Sub

where me.Test equals your fields name
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


:

I have tried to do that in the form's design view, I simply type in the text
I want into the default value box, surrounded by quotes, but nothing shows up
in the text box when i go to data entry mode, and nothing is entered into the
field in the table unless I manually type it in. I can enter the default
value in the table design view and I need it entered into a specific form
because each form has a different default value for that text box

:

In design View click on the field you want to have the default value. and
look at the properties and find the Default value property and add the value
you want.
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


:

I am having a problem setting the default value for a text box in a form. I
have 8 forms; each form applies to a certain category name. I want a text
box in the form to have a default value of the category name, so that the
user does not have to type anything it will just populate to the categoryname
field in the table, I am going to lock the field so it can not be changed.
When I set the default value property for the textbox inside the form design
view, nothing shows up (in the form or in the table) No matter what I try I
keep getting blank values in the categoryname field.
I can't set the default value in the Table Design because it has multiple
values.
I'm not for sure if this makes sense or if I have a bad design idea, I am
fairly new to access. Any help would be greatly appreciated
 
G

Guest

Look at the exact name of the field in the properties under the Other tab.
Make sure that is an exact match for what you have in the On Current Event.
Even though the field in the table is called CategoryName it may not be the
same as the field name.
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


OmahaAccess said:
The SSO - Reached Waters of State is the form name.
Here is a copy of the current event code:

Private Sub Form_Current()

Me.CategoryName = "Test"

End Sub

I got another error - "Compile error: Method or data member not found."

The debugger highlighted: ".CategoryName ="

Thanks


Cyberwolf said:
Do this. Copy the info on the OnCurrent event and I will look at it.
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


OmahaAccess said:
Thanks all for responding. I definetly appreciate the help.
I tried typing [SSO - Reached Waters of State].CategoryName = "Test" in the
on current event in the form properties. When I opened the form it gave me
an error - "Run-time error '2465': Microsoft Access can't find the field
'l' referred to in your expression. Any ideas?

:

Hi Cyberwolf,

I pick out & answer the really easy questions and leave you clever lot to
concentrate on the hard questions :p

TonyT..

:

Thanks for responding Tony. I appreciate it.
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


:

Hi Omaha,

The Me. refers to the current form saves having to type
Forms!.FormName.Control to reference each control on the current form.

To let VB or SQL know there are spaces enclose the field or control name
with [] eg; Me.[Control Name With Spaces In]

TonyT..

:

Another dumb question, Im not so great with VB, what if there are spaces how
do you let vb now that it is one string of characters


:

I was assuming you were doing this on a new record. In design view go to the
forms On Current Event and create a new procedure to look like this

Private Sub Form_Current()

Me.Test = "Test"

End Sub

where me.Test equals your fields name
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


:

I have tried to do that in the form's design view, I simply type in the text
I want into the default value box, surrounded by quotes, but nothing shows up
in the text box when i go to data entry mode, and nothing is entered into the
field in the table unless I manually type it in. I can enter the default
value in the table design view and I need it entered into a specific form
because each form has a different default value for that text box

:

In design View click on the field you want to have the default value. and
look at the properties and find the Default value property and add the value
you want.
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


:

I am having a problem setting the default value for a text box in a form. I
have 8 forms; each form applies to a certain category name. I want a text
box in the form to have a default value of the category name, so that the
user does not have to type anything it will just populate to the categoryname
field in the table, I am going to lock the field so it can not be changed.
When I set the default value property for the textbox inside the form design
view, nothing shows up (in the form or in the table) No matter what I try I
keep getting blank values in the categoryname field.
I can't set the default value in the Table Design because it has multiple
values.
I'm not for sure if this makes sense or if I have a bad design idea, I am
fairly new to access. Any help would be greatly appreciated
 
G

Guest

That seems to the right name. I have to leave for a bit, thanks for your
help so far. i'll be back later this morning

Cyberwolf said:
Look at the exact name of the field in the properties under the Other tab.
Make sure that is an exact match for what you have in the On Current Event.
Even though the field in the table is called CategoryName it may not be the
same as the field name.
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


OmahaAccess said:
The SSO - Reached Waters of State is the form name.
Here is a copy of the current event code:

Private Sub Form_Current()

Me.CategoryName = "Test"

End Sub

I got another error - "Compile error: Method or data member not found."

The debugger highlighted: ".CategoryName ="

Thanks


Cyberwolf said:
Do this. Copy the info on the OnCurrent event and I will look at it.
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


:

Thanks all for responding. I definetly appreciate the help.
I tried typing [SSO - Reached Waters of State].CategoryName = "Test" in the
on current event in the form properties. When I opened the form it gave me
an error - "Run-time error '2465': Microsoft Access can't find the field
'l' referred to in your expression. Any ideas?

:

Hi Cyberwolf,

I pick out & answer the really easy questions and leave you clever lot to
concentrate on the hard questions :p

TonyT..

:

Thanks for responding Tony. I appreciate it.
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


:

Hi Omaha,

The Me. refers to the current form saves having to type
Forms!.FormName.Control to reference each control on the current form.

To let VB or SQL know there are spaces enclose the field or control name
with [] eg; Me.[Control Name With Spaces In]

TonyT..

:

Another dumb question, Im not so great with VB, what if there are spaces how
do you let vb now that it is one string of characters


:

I was assuming you were doing this on a new record. In design view go to the
forms On Current Event and create a new procedure to look like this

Private Sub Form_Current()

Me.Test = "Test"

End Sub

where me.Test equals your fields name
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


:

I have tried to do that in the form's design view, I simply type in the text
I want into the default value box, surrounded by quotes, but nothing shows up
in the text box when i go to data entry mode, and nothing is entered into the
field in the table unless I manually type it in. I can enter the default
value in the table design view and I need it entered into a specific form
because each form has a different default value for that text box

:

In design View click on the field you want to have the default value. and
look at the properties and find the Default value property and add the value
you want.
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


:

I am having a problem setting the default value for a text box in a form. I
have 8 forms; each form applies to a certain category name. I want a text
box in the form to have a default value of the category name, so that the
user does not have to type anything it will just populate to the categoryname
field in the table, I am going to lock the field so it can not be changed.
When I set the default value property for the textbox inside the form design
view, nothing shows up (in the form or in the table) No matter what I try I
keep getting blank values in the categoryname field.
I can't set the default value in the Table Design because it has multiple
values.
I'm not for sure if this makes sense or if I have a bad design idea, I am
fairly new to access. Any help would be greatly appreciated
 
G

Guest

Try retyping the Me.CategoryName, but as soon as you hit the "." a popup
window should appear allowing you to see all of the valid options for this
method. Then start typing in the CategoryName. This should now show
highlighted in the pop up window. If it doesn't this means the field name is
not right.
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


OmahaAccess said:
The SSO - Reached Waters of State is the form name.
Here is a copy of the current event code:

Private Sub Form_Current()

Me.CategoryName = "Test"

End Sub

I got another error - "Compile error: Method or data member not found."

The debugger highlighted: ".CategoryName ="

Thanks


Cyberwolf said:
Do this. Copy the info on the OnCurrent event and I will look at it.
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


OmahaAccess said:
Thanks all for responding. I definetly appreciate the help.
I tried typing [SSO - Reached Waters of State].CategoryName = "Test" in the
on current event in the form properties. When I opened the form it gave me
an error - "Run-time error '2465': Microsoft Access can't find the field
'l' referred to in your expression. Any ideas?

:

Hi Cyberwolf,

I pick out & answer the really easy questions and leave you clever lot to
concentrate on the hard questions :p

TonyT..

:

Thanks for responding Tony. I appreciate it.
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


:

Hi Omaha,

The Me. refers to the current form saves having to type
Forms!.FormName.Control to reference each control on the current form.

To let VB or SQL know there are spaces enclose the field or control name
with [] eg; Me.[Control Name With Spaces In]

TonyT..

:

Another dumb question, Im not so great with VB, what if there are spaces how
do you let vb now that it is one string of characters


:

I was assuming you were doing this on a new record. In design view go to the
forms On Current Event and create a new procedure to look like this

Private Sub Form_Current()

Me.Test = "Test"

End Sub

where me.Test equals your fields name
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


:

I have tried to do that in the form's design view, I simply type in the text
I want into the default value box, surrounded by quotes, but nothing shows up
in the text box when i go to data entry mode, and nothing is entered into the
field in the table unless I manually type it in. I can enter the default
value in the table design view and I need it entered into a specific form
because each form has a different default value for that text box

:

In design View click on the field you want to have the default value. and
look at the properties and find the Default value property and add the value
you want.
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


:

I am having a problem setting the default value for a text box in a form. I
have 8 forms; each form applies to a certain category name. I want a text
box in the form to have a default value of the category name, so that the
user does not have to type anything it will just populate to the categoryname
field in the table, I am going to lock the field so it can not be changed.
When I set the default value property for the textbox inside the form design
view, nothing shows up (in the form or in the table) No matter what I try I
keep getting blank values in the categoryname field.
I can't set the default value in the Table Design because it has multiple
values.
I'm not for sure if this makes sense or if I have a bad design idea, I am
fairly new to access. Any help would be greatly appreciated
 
G

Guest

I think I got it now. Thank you for you help. In the table, the field name
was "CatergoryName" and in the form the control source was "CategoryName".
By looking at the popup in the VBCode I saw this and changed it and it seems
to work now.

Cyberwolf said:
Try retyping the Me.CategoryName, but as soon as you hit the "." a popup
window should appear allowing you to see all of the valid options for this
method. Then start typing in the CategoryName. This should now show
highlighted in the pop up window. If it doesn't this means the field name is
not right.
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


OmahaAccess said:
The SSO - Reached Waters of State is the form name.
Here is a copy of the current event code:

Private Sub Form_Current()

Me.CategoryName = "Test"

End Sub

I got another error - "Compile error: Method or data member not found."

The debugger highlighted: ".CategoryName ="

Thanks


Cyberwolf said:
Do this. Copy the info on the OnCurrent event and I will look at it.
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


:

Thanks all for responding. I definetly appreciate the help.
I tried typing [SSO - Reached Waters of State].CategoryName = "Test" in the
on current event in the form properties. When I opened the form it gave me
an error - "Run-time error '2465': Microsoft Access can't find the field
'l' referred to in your expression. Any ideas?

:

Hi Cyberwolf,

I pick out & answer the really easy questions and leave you clever lot to
concentrate on the hard questions :p

TonyT..

:

Thanks for responding Tony. I appreciate it.
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


:

Hi Omaha,

The Me. refers to the current form saves having to type
Forms!.FormName.Control to reference each control on the current form.

To let VB or SQL know there are spaces enclose the field or control name
with [] eg; Me.[Control Name With Spaces In]

TonyT..

:

Another dumb question, Im not so great with VB, what if there are spaces how
do you let vb now that it is one string of characters


:

I was assuming you were doing this on a new record. In design view go to the
forms On Current Event and create a new procedure to look like this

Private Sub Form_Current()

Me.Test = "Test"

End Sub

where me.Test equals your fields name
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


:

I have tried to do that in the form's design view, I simply type in the text
I want into the default value box, surrounded by quotes, but nothing shows up
in the text box when i go to data entry mode, and nothing is entered into the
field in the table unless I manually type it in. I can enter the default
value in the table design view and I need it entered into a specific form
because each form has a different default value for that text box

:

In design View click on the field you want to have the default value. and
look at the properties and find the Default value property and add the value
you want.
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


:

I am having a problem setting the default value for a text box in a form. I
have 8 forms; each form applies to a certain category name. I want a text
box in the form to have a default value of the category name, so that the
user does not have to type anything it will just populate to the categoryname
field in the table, I am going to lock the field so it can not be changed.
When I set the default value property for the textbox inside the form design
view, nothing shows up (in the form or in the table) No matter what I try I
keep getting blank values in the categoryname field.
I can't set the default value in the Table Design because it has multiple
values.
I'm not for sure if this makes sense or if I have a bad design idea, I am
fairly new to access. Any help would be greatly appreciated
 
G

Guest

It's always the little things that get you.
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


OmahaAccess said:
I think I got it now. Thank you for you help. In the table, the field name
was "CatergoryName" and in the form the control source was "CategoryName".
By looking at the popup in the VBCode I saw this and changed it and it seems
to work now.

Cyberwolf said:
Try retyping the Me.CategoryName, but as soon as you hit the "." a popup
window should appear allowing you to see all of the valid options for this
method. Then start typing in the CategoryName. This should now show
highlighted in the pop up window. If it doesn't this means the field name is
not right.
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


OmahaAccess said:
The SSO - Reached Waters of State is the form name.
Here is a copy of the current event code:

Private Sub Form_Current()

Me.CategoryName = "Test"

End Sub

I got another error - "Compile error: Method or data member not found."

The debugger highlighted: ".CategoryName ="

Thanks


:

Do this. Copy the info on the OnCurrent event and I will look at it.
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


:

Thanks all for responding. I definetly appreciate the help.
I tried typing [SSO - Reached Waters of State].CategoryName = "Test" in the
on current event in the form properties. When I opened the form it gave me
an error - "Run-time error '2465': Microsoft Access can't find the field
'l' referred to in your expression. Any ideas?

:

Hi Cyberwolf,

I pick out & answer the really easy questions and leave you clever lot to
concentrate on the hard questions :p

TonyT..

:

Thanks for responding Tony. I appreciate it.
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


:

Hi Omaha,

The Me. refers to the current form saves having to type
Forms!.FormName.Control to reference each control on the current form.

To let VB or SQL know there are spaces enclose the field or control name
with [] eg; Me.[Control Name With Spaces In]

TonyT..

:

Another dumb question, Im not so great with VB, what if there are spaces how
do you let vb now that it is one string of characters


:

I was assuming you were doing this on a new record. In design view go to the
forms On Current Event and create a new procedure to look like this

Private Sub Form_Current()

Me.Test = "Test"

End Sub

where me.Test equals your fields name
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


:

I have tried to do that in the form's design view, I simply type in the text
I want into the default value box, surrounded by quotes, but nothing shows up
in the text box when i go to data entry mode, and nothing is entered into the
field in the table unless I manually type it in. I can enter the default
value in the table design view and I need it entered into a specific form
because each form has a different default value for that text box

:

In design View click on the field you want to have the default value. and
look at the properties and find the Default value property and add the value
you want.
--
Cyberwolf
Finder of Paths, Hunter of Prey
Ghost of the Night, Shadow of Day
The Wolf


:

I am having a problem setting the default value for a text box in a form. I
have 8 forms; each form applies to a certain category name. I want a text
box in the form to have a default value of the category name, so that the
user does not have to type anything it will just populate to the categoryname
field in the table, I am going to lock the field so it can not be changed.
When I set the default value property for the textbox inside the form design
view, nothing shows up (in the form or in the table) No matter what I try I
keep getting blank values in the categoryname field.
I can't set the default value in the Table Design because it has multiple
values.
I'm not for sure if this makes sense or if I have a bad design idea, I am
fairly new to access. Any help would be greatly appreciated
 

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