A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Problem with default value updating table



 
 
Thread Tools Display Modes
  #11  
Old November 17th, 2006, 01:34 PM posted to microsoft.public.access.gettingstarted
Cyberwolf
external usenet poster
 
Posts: 46
Default Problem with default value updating table

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" wrote:

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" wrote:

Hi Cyberwolf,

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

TonyT..

"Cyberwolf" wrote:

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


"TonyT" wrote:

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" wrote:

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


"Cyberwolf" wrote:

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


"OmahaAccess" wrote:

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

"Cyberwolf" wrote:

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


"OmahaAccess" wrote:

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

  #12  
Old November 17th, 2006, 01:35 PM posted to microsoft.public.access.gettingstarted
Cyberwolf
external usenet poster
 
Posts: 46
Default Problem with default value updating table

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" wrote:

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" wrote:

Hi Cyberwolf,

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

TonyT..

"Cyberwolf" wrote:

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


"TonyT" wrote:

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" wrote:

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


"Cyberwolf" wrote:

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


"OmahaAccess" wrote:

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

"Cyberwolf" wrote:

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


"OmahaAccess" wrote:

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

  #13  
Old November 17th, 2006, 01:49 PM posted to microsoft.public.access.gettingstarted
OmahaAccess
external usenet poster
 
Posts: 24
Default Problem with default value updating table

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" wrote:

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" wrote:

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" wrote:

Hi Cyberwolf,

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

TonyT..

"Cyberwolf" wrote:

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


"TonyT" wrote:

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" wrote:

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


"Cyberwolf" wrote:

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


"OmahaAccess" wrote:

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

"Cyberwolf" wrote:

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


"OmahaAccess" wrote:

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

  #14  
Old November 17th, 2006, 01:50 PM posted to microsoft.public.access.gettingstarted
OmahaAccess
external usenet poster
 
Posts: 24
Default Problem with default value updating table

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" wrote:

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" wrote:

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" wrote:

Hi Cyberwolf,

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

TonyT..

"Cyberwolf" wrote:

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


"TonyT" wrote:

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" wrote:

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


"Cyberwolf" wrote:

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


"OmahaAccess" wrote:

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

"Cyberwolf" wrote:

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


"OmahaAccess" wrote:

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

  #15  
Old November 17th, 2006, 01:54 PM posted to microsoft.public.access.gettingstarted
Cyberwolf
external usenet poster
 
Posts: 46
Default Problem with default value updating table

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" wrote:

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" wrote:

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" wrote:

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" wrote:

Hi Cyberwolf,

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

TonyT..

"Cyberwolf" wrote:

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


"TonyT" wrote:

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" wrote:

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


"Cyberwolf" wrote:

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


"OmahaAccess" wrote:

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

"Cyberwolf" wrote:

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


"OmahaAccess" wrote:

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

  #16  
Old November 17th, 2006, 02:04 PM posted to microsoft.public.access.gettingstarted
OmahaAccess
external usenet poster
 
Posts: 24
Default Problem with default value updating table

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" wrote:

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" wrote:

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" wrote:

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" wrote:

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" wrote:

Hi Cyberwolf,

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

TonyT..

"Cyberwolf" wrote:

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


"TonyT" wrote:

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" wrote:

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


"Cyberwolf" wrote:

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


"OmahaAccess" wrote:

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

"Cyberwolf" wrote:

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


"OmahaAccess" wrote:

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

  #17  
Old November 17th, 2006, 02:28 PM posted to microsoft.public.access.gettingstarted
Cyberwolf
external usenet poster
 
Posts: 46
Default Problem with default value updating table

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" wrote:

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" wrote:

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" wrote:

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" wrote:

Hi Cyberwolf,

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

TonyT..

"Cyberwolf" wrote:

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


"TonyT" wrote:

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" wrote:

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


"Cyberwolf" wrote:

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


"OmahaAccess" wrote:

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

"Cyberwolf" wrote:

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


"OmahaAccess" wrote:

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

  #18  
Old November 17th, 2006, 04:40 PM posted to microsoft.public.access.gettingstarted
OmahaAccess
external usenet poster
 
Posts: 24
Default Problem with default value updating table

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" wrote:

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" wrote:

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" wrote:

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" wrote:

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" wrote:

Hi Cyberwolf,

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

TonyT..

"Cyberwolf" wrote:

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


"TonyT" wrote:

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" wrote:

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


"Cyberwolf" wrote:

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


"OmahaAccess" wrote:

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

"Cyberwolf" wrote:

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


"OmahaAccess" wrote:

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

  #19  
Old November 17th, 2006, 04:42 PM posted to microsoft.public.access.gettingstarted
Cyberwolf
external usenet poster
 
Posts: 46
Default Problem with default value updating table

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" wrote:

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" wrote:

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" wrote:

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" wrote:

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" wrote:

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" wrote:

Hi Cyberwolf,

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

TonyT..

"Cyberwolf" wrote:

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


"TonyT" wrote:

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" wrote:

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


"Cyberwolf" wrote:

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


"OmahaAccess" wrote:

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

"Cyberwolf" wrote:

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


"OmahaAccess" wrote:

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

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:46 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.