Automatically updating table from form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form where lots of information is entered by date. An entry would
look like "0807SA1.xyz". This information is entered every day and the only
part that changes is the date. Is there a way that the fields update
automatically where just the date changes?
 
Crystal,
I'm assuming the 0807 is Month and Day.
You could set the Default Value for the field to...
=Month(Date()) & Day(Date()) & "SA1.xyz"
Every day when you create a new record, that field will be eneterd by Default.

You really should include the Year too. (080706SA1.xyz) Next year there will be a
duplicate 0807SA1.xyz value assigned.
Adding the year will prevent any dupes.
 
In the form, I set the control source to =[AMStaticTestRawFileName] & " " &
"Processed.xyz". This works fine and the info fills in when I run the form.
The only problem is that the information in the table doesn't update. It's
still blank. Any suggestions?
 
Crystal,
Well, that's quite a bit different than your first post... and information as to * how
and where * you get [AMStaticTestRawFileName] would have been helpful.
I'll have to assume that [AMStaticTestRawFileName] is on that same form...

Your string is not storing in the table because the field you have on the form now is
an "unbound calculated" field, and unassociated with any table field.
The ControlSource for that field should be the table fieldname (ex. name [MyFileName])
that will actually store that value.

If you enter [AMStaticTestRawFileName] on the form, then use the AfterUpdate event of
that field to set the value of the [MyFileName] "bound" field.

Private Sub AMStaticTestRawFileName_AfterUpdate()
MyFileName = AMStaticTestRawFileName & " Processed.xyz"
End Sub
--
hth
Al Campagna
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

Crystal said:
In the form, I set the control source to =[AMStaticTestRawFileName] & " " &
"Processed.xyz". This works fine and the info fills in when I run the form.
The only problem is that the information in the table doesn't update. It's
still blank. Any suggestions?

Al Campagna said:
Crystal,
I'm assuming the 0807 is Month and Day.
You could set the Default Value for the field to...
=Month(Date()) & Day(Date()) & "SA1.xyz"
Every day when you create a new record, that field will be eneterd by Default.

You really should include the Year too. (080706SA1.xyz) Next year there will be a
duplicate 0807SA1.xyz value assigned.
Adding the year will prevent any dupes.
--
hth
Al Campagna
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions
 
[AMStaticTestRawFileName] is already on the same form and is already filled
out.

I tried entering Private Sub AMStaticTestRawFileName_AfterUpdate()
MyFileName = AMStaticTestRawFileName & " Processed.xyz"
End Sub in the After Update field, but nothing happended. Am I missing something else?

Thanks for the help

Al Campagna said:
Crystal,
Well, that's quite a bit different than your first post... and information as to * how
and where * you get [AMStaticTestRawFileName] would have been helpful.
I'll have to assume that [AMStaticTestRawFileName] is on that same form...

Your string is not storing in the table because the field you have on the form now is
an "unbound calculated" field, and unassociated with any table field.
The ControlSource for that field should be the table fieldname (ex. name [MyFileName])
that will actually store that value.

If you enter [AMStaticTestRawFileName] on the form, then use the AfterUpdate event of
that field to set the value of the [MyFileName] "bound" field.

Private Sub AMStaticTestRawFileName_AfterUpdate()
MyFileName = AMStaticTestRawFileName & " Processed.xyz"
End Sub
--
hth
Al Campagna
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

Crystal said:
In the form, I set the control source to =[AMStaticTestRawFileName] & " " &
"Processed.xyz". This works fine and the info fills in when I run the form.
The only problem is that the information in the table doesn't update. It's
still blank. Any suggestions?

Al Campagna said:
Crystal,
I'm assuming the 0807 is Month and Day.
You could set the Default Value for the field to...
=Month(Date()) & Day(Date()) & "SA1.xyz"
Every day when you create a new record, that field will be eneterd by Default.

You really should include the Year too. (080706SA1.xyz) Next year there will be a
duplicate 0807SA1.xyz value assigned.
Adding the year will prevent any dupes.
--
hth
Al Campagna
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

I have a form where lots of information is entered by date. An entry would
look like "0807SA1.xyz". This information is entered every day and the only
part that changes is the date. Is there a way that the fields update
automatically where just the date changes?
 
Crystal,
Go to the AfterUpdate Event of AMStaticTestRawFileName, blank out anything there,and
leave the cursor in the empty field.
Using the dropdown arrow on the right of the field, select Event Procedure.
Now click the liite 3 dot button to the right (...)
You are now in the module for the form, and you should see this...

Private Sub AMStaticTestRawFileName_AfterUpdate()

End Sub

This is the where the code that "fires" on the AfterUpdate event of
AMStaticTestRawFileName will go.
Adding the code I sent between those lines...
(Using YOUR own name for the field (MyFileName) we used in the example )

Private Sub AMStaticTestRawFileName_AfterUpdate()
MyFileName = AMStaticTestRawFileName & " Processed.xyz"
End Sub

Close the module and return to the form, and open it.
Enter "XYZ" value in AMStaticTestRawFileName...
Your other field should update to "XYZ Processed.xyz"

--
hth
Al Campagna
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions


Fire up the form, and eneter a value into AMStaticTestRawFileName
Crystal said:
[] is already on the same form and is already filled
out.

I tried entering Private Sub AMStaticTestRawFileName_AfterUpdate()
MyFileName = AMStaticTestRawFileName & " Processed.xyz"
End Sub in the After Update field, but nothing happended. Am I missing something
else?

Thanks for the help

Al Campagna said:
Crystal,
Well, that's quite a bit different than your first post... and information as to *
how
and where * you get [AMStaticTestRawFileName] would have been helpful.
I'll have to assume that [AMStaticTestRawFileName] is on that same form...

Your string is not storing in the table because the field you have on the form now
is
an "unbound calculated" field, and unassociated with any table field.
The ControlSource for that field should be the table fieldname (ex. name
[MyFileName])
that will actually store that value.

If you enter [AMStaticTestRawFileName] on the form, then use the AfterUpdate event
of
that field to set the value of the [MyFileName] "bound" field.

Private Sub AMStaticTestRawFileName_AfterUpdate()
MyFileName = AMStaticTestRawFileName & " Processed.xyz"
End Sub
--
hth
Al Campagna
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

Crystal said:
In the form, I set the control source to =[AMStaticTestRawFileName] & " " &
"Processed.xyz". This works fine and the info fills in when I run the form.
The only problem is that the information in the table doesn't update. It's
still blank. Any suggestions?

:

Crystal,
I'm assuming the 0807 is Month and Day.
You could set the Default Value for the field to...
=Month(Date()) & Day(Date()) & "SA1.xyz"
Every day when you create a new record, that field will be eneterd by Default.

You really should include the Year too. (080706SA1.xyz) Next year there will be
a
duplicate 0807SA1.xyz value assigned.
Adding the year will prevent any dupes.
--
hth
Al Campagna
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

I have a form where lots of information is entered by date. An entry would
look like "0807SA1.xyz". This information is entered every day and the only
part that changes is the date. Is there a way that the fields update
automatically where just the date changes?
 
That worked. Thanks very much. Sorry, but I have one more question

Is it possible to not enter the xyz? There's about 30 fields to fill out so
if xyz doesn't have to be entered 30 times, that would be great.

Thanks

Al Campagna said:
Crystal,
Go to the AfterUpdate Event of AMStaticTestRawFileName, blank out anything there,and
leave the cursor in the empty field.
Using the dropdown arrow on the right of the field, select Event Procedure.
Now click the liite 3 dot button to the right (...)
You are now in the module for the form, and you should see this...

Private Sub AMStaticTestRawFileName_AfterUpdate()

End Sub

This is the where the code that "fires" on the AfterUpdate event of
AMStaticTestRawFileName will go.
Adding the code I sent between those lines...
(Using YOUR own name for the field (MyFileName) we used in the example )

Private Sub AMStaticTestRawFileName_AfterUpdate()
MyFileName = AMStaticTestRawFileName & " Processed.xyz"
End Sub

Close the module and return to the form, and open it.
Enter "XYZ" value in AMStaticTestRawFileName...
Your other field should update to "XYZ Processed.xyz"

--
hth
Al Campagna
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions


Fire up the form, and eneter a value into AMStaticTestRawFileName
Crystal said:
[] is already on the same form and is already filled
out.

I tried entering Private Sub AMStaticTestRawFileName_AfterUpdate()
MyFileName = AMStaticTestRawFileName & " Processed.xyz"
End Sub in the After Update field, but nothing happended. Am I missing something
else?

Thanks for the help

Al Campagna said:
Crystal,
Well, that's quite a bit different than your first post... and information as to *
how
and where * you get [AMStaticTestRawFileName] would have been helpful.
I'll have to assume that [AMStaticTestRawFileName] is on that same form...

Your string is not storing in the table because the field you have on the form now
is
an "unbound calculated" field, and unassociated with any table field.
The ControlSource for that field should be the table fieldname (ex. name
[MyFileName])
that will actually store that value.

If you enter [AMStaticTestRawFileName] on the form, then use the AfterUpdate event
of
that field to set the value of the [MyFileName] "bound" field.

Private Sub AMStaticTestRawFileName_AfterUpdate()
MyFileName = AMStaticTestRawFileName & " Processed.xyz"
End Sub
--
hth
Al Campagna
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

In the form, I set the control source to =[AMStaticTestRawFileName] & " " &
"Processed.xyz". This works fine and the info fills in when I run the form.
The only problem is that the information in the table doesn't update. It's
still blank. Any suggestions?

:

Crystal,
I'm assuming the 0807 is Month and Day.
You could set the Default Value for the field to...
=Month(Date()) & Day(Date()) & "SA1.xyz"
Every day when you create a new record, that field will be eneterd by Default.

You really should include the Year too. (080706SA1.xyz) Next year there will be
a
duplicate 0807SA1.xyz value assigned.
Adding the year will prevent any dupes.
--
hth
Al Campagna
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

I have a form where lots of information is entered by date. An entry would
look like "0807SA1.xyz". This information is entered every day and the only
part that changes is the date. Is there a way that the fields update
automatically where just the date changes?
 
I figured it out. I just put the same info in the Click Space. Thanks so
much for all your help.

Al Campagna said:
Crystal,
Go to the AfterUpdate Event of AMStaticTestRawFileName, blank out anything there,and
leave the cursor in the empty field.
Using the dropdown arrow on the right of the field, select Event Procedure.
Now click the liite 3 dot button to the right (...)
You are now in the module for the form, and you should see this...

Private Sub AMStaticTestRawFileName_AfterUpdate()

End Sub

This is the where the code that "fires" on the AfterUpdate event of
AMStaticTestRawFileName will go.
Adding the code I sent between those lines...
(Using YOUR own name for the field (MyFileName) we used in the example )

Private Sub AMStaticTestRawFileName_AfterUpdate()
MyFileName = AMStaticTestRawFileName & " Processed.xyz"
End Sub

Close the module and return to the form, and open it.
Enter "XYZ" value in AMStaticTestRawFileName...
Your other field should update to "XYZ Processed.xyz"

--
hth
Al Campagna
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions


Fire up the form, and eneter a value into AMStaticTestRawFileName
Crystal said:
[] is already on the same form and is already filled
out.

I tried entering Private Sub AMStaticTestRawFileName_AfterUpdate()
MyFileName = AMStaticTestRawFileName & " Processed.xyz"
End Sub in the After Update field, but nothing happended. Am I missing something
else?

Thanks for the help

Al Campagna said:
Crystal,
Well, that's quite a bit different than your first post... and information as to *
how
and where * you get [AMStaticTestRawFileName] would have been helpful.
I'll have to assume that [AMStaticTestRawFileName] is on that same form...

Your string is not storing in the table because the field you have on the form now
is
an "unbound calculated" field, and unassociated with any table field.
The ControlSource for that field should be the table fieldname (ex. name
[MyFileName])
that will actually store that value.

If you enter [AMStaticTestRawFileName] on the form, then use the AfterUpdate event
of
that field to set the value of the [MyFileName] "bound" field.

Private Sub AMStaticTestRawFileName_AfterUpdate()
MyFileName = AMStaticTestRawFileName & " Processed.xyz"
End Sub
--
hth
Al Campagna
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

In the form, I set the control source to =[AMStaticTestRawFileName] & " " &
"Processed.xyz". This works fine and the info fills in when I run the form.
The only problem is that the information in the table doesn't update. It's
still blank. Any suggestions?

:

Crystal,
I'm assuming the 0807 is Month and Day.
You could set the Default Value for the field to...
=Month(Date()) & Day(Date()) & "SA1.xyz"
Every day when you create a new record, that field will be eneterd by Default.

You really should include the Year too. (080706SA1.xyz) Next year there will be
a
duplicate 0807SA1.xyz value assigned.
Adding the year will prevent any dupes.
--
hth
Al Campagna
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions

I have a form where lots of information is entered by date. An entry would
look like "0807SA1.xyz". This information is entered every day and the only
part that changes is the date. Is there a way that the fields update
automatically where just the date changes?
 

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