Forward value to next record

  • Thread starter Balmora via AccessMonster.com
  • Start date
B

Balmora via AccessMonster.com

Hello all,
I have bin using this :

If Not IsNull(Me.Ctl01BalanceCreditField1) Then
Me.Ctl01PreviousBalanceCreditField1.DefaultValue = """" & Me.
Ctl01BalanceCreditField1 & """"

to send the value of Ctl01BalanceCreditField1 to the next new record in
Ctl01PreviousBalanceCreditField1 and it works great because i use it in a
create new record buton but, what i would realy want would be to send the
value of one textbox to the next record not to a new record so lest say i
have 3 records id1,2,3 and im in the record 1 i change a value and when i
click on next record it will update the record 2 not 3 or new record i you
see what i meen.

just to let you know, i have made my own previous, next and new record
command butons so all the textboxs would be updated as the person navigates
thought the records.

thks in advance for all your help!
 
J

Jeanette Cunningham

Balmora,
you could keep a hidden form open.
When you change a value of record1, send it to a text box on the hidden
form.
When you move to record2, copy the value from the text box on the hidden
form to the field you want for record2.
 
B

Balmora via AccessMonster.com

oh! ok, sounds easy, how should i go about doing this? can a table to store
the values do? and what vba code should i use to copy and pace?

Jeanette said:
Balmora,
you could keep a hidden form open.
When you change a value of record1, send it to a text box on the hidden
form.
When you move to record2, copy the value from the text box on the hidden
form to the field you want for record2.
Hello all,
I have bin using this :
[quoted text clipped - 17 lines]
thks in advance for all your help!
 
J

Jeanette Cunningham

Balmora via AccessMonster.com said:
oh! ok, sounds easy, how should i go about doing this? can a table to
store
the values do? and what vba code should i use to copy and pace?

Jeanette said:
Balmora,
you could keep a hidden form open.
When you change a value of record1, send it to a text box on the hidden
form.
When you move to record2, copy the value from the text box on the hidden
form to the field you want for record2.
Hello all,
I have bin using this :
[quoted text clipped - 17 lines]
thks in advance for all your help!
 
J

Jeanette Cunningham

Here's the general idea.
Assume you have a text box called txtAA
To save its value to the hidden form
On its after update event put code like this

-->
Forms!frmHidden!txtOne = Me.txtAA

In the custom button that navigates to the next record
Once you have opened the next record, put code like this
to pull the value from the hidden form into txtAA

-->
With Forms!frmHidden!
If Len(.txtOne & vbNullString) >0 Then
Me.txtAA = .txtOne
End If
End With


Jeanette Cunningham -- Melbourne Victoria Australia


Balmora via AccessMonster.com said:
oh! ok, sounds easy, how should i go about doing this? can a table to
store
the values do? and what vba code should i use to copy and pace?

Jeanette said:
Balmora,
you could keep a hidden form open.
When you change a value of record1, send it to a text box on the hidden
form.
When you move to record2, copy the value from the text box on the hidden
form to the field you want for record2.
Hello all,
I have bin using this :
[quoted text clipped - 17 lines]
thks in advance for all your help!
 
B

Balmora via AccessMonster.com

Hello
Ok got it to work with a table to store the number im very happy thank you
for the idea i used the next record command button to store the number and
the Form_Current event to get the value back the thing is when i use the
previous command button, the Form_Current event gets the value again but i
dont want it to. how can i prevent that?

Jeanette said:
Here's the general idea.
Assume you have a text box called txtAA
To save its value to the hidden form
On its after update event put code like this

-->
Forms!frmHidden!txtOne = Me.txtAA

In the custom button that navigates to the next record
Once you have opened the next record, put code like this
to pull the value from the hidden form into txtAA

-->
With Forms!frmHidden!
If Len(.txtOne & vbNullString) >0 Then
Me.txtAA = .txtOne
End If
End With

Jeanette Cunningham -- Melbourne Victoria Australia
oh! ok, sounds easy, how should i go about doing this? can a table to
store
[quoted text clipped - 12 lines]
 
B

Balmora via AccessMonster.com

Ok! i got it to work, its prety cooll too when i hit previous command button,
i put a 0 in the table and in the Form_Current just before i tell the code to
get the value i ask it to check if its 0 and if it is then i tell it to do
nothing. simple hun :) thanks for all your help :)

oh! if you have an idea on how the create a primary key that will generat
month and year automaticaly please let me know
Hello
Ok got it to work with a table to store the number im very happy thank you
for the idea i used the next record command button to store the number and
the Form_Current event to get the value back the thing is when i use the
previous command button, the Form_Current event gets the value again but i
dont want it to. how can i prevent that?
Here's the general idea.
Assume you have a text box called txtAA
[quoted text clipped - 22 lines]
 

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