473,497 Members | 2,093 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

pushing data from unbound text boxes

Hi folks.

I have 2 forms, frmBorrow and frmHistory

frmBorrow has an unbound multi-column combo box (cboMember) and 7
unbound text boxes (MemNo, MemName, MemIC, MemType, CourseFaculty,
Borrow, Due)

frmHistory has the following text boxes: MemName, Borrow, Due

When a record is selected from cboMember, the 1st 5 text boxes are
updated with the details in the combo box and the last 2 text boxes
are updated to display the current date and the date of the 7th day
from the current date.

I would like to push these data into the text boxes in frmHistory
(with the exception of MemNo, MemIC, MemType, and CourseFaculty). How
do I do this? I could only come up with the follwing codes but I do
not know how to use them:

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Dim rst as RecordSet

rst.AddNew
rst.MemName = Me.txtMemName
rst.Borrow = Me.txtBorrow
rst.Due = Me.txtDue
rst.Update

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

I know I'm missing some coding but I cannot figure out what. Thank
you.
Nov 13 '05 #1
7 2313
rkc

"Aravind" <so**********@hotmail.com> wrote in message
news:61**************************@posting.google.c om...
Hi folks.

I have 2 forms, frmBorrow and frmHistory

frmBorrow has an unbound multi-column combo box (cboMember) and 7
unbound text boxes (MemNo, MemName, MemIC, MemType, CourseFaculty,
Borrow, Due)

frmHistory has the following text boxes: MemName, Borrow, Due

When a record is selected from cboMember, the 1st 5 text boxes are
updated with the details in the combo box and the last 2 text boxes
are updated to display the current date and the date of the 7th day
from the current date.

I would like to push these data into the text boxes in frmHistory
(with the exception of MemNo, MemIC, MemType, and CourseFaculty). How
do I do this? I could only come up with the follwing codes but I do
not know how to use them:

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Dim rst as RecordSet

rst.AddNew
rst.MemName = Me.txtMemName
rst.Borrow = Me.txtBorrow
rst.Due = Me.txtDue
rst.Update

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


Are both forms open? If so whenever you want this to happen run
the follwing code from frmBorrow.

with forms("frmHistory")
!MemName = Me.txtMemName
!Borrow = Me.txtBorrow
!Due = Me.txtDue
end with

Nov 13 '05 #2
"rkc" <rk*@yabba.dabba.do.rochester.rr.bomb> wrote in message news:<YQ*******************@twister.nyroc.rr.com>. ..
"Aravind" <so**********@hotmail.com> wrote in message
news:61**************************@posting.google.c om...
Hi folks.

I have 2 forms, frmBorrow and frmHistory

frmBorrow has an unbound multi-column combo box (cboMember) and 7
unbound text boxes (MemNo, MemName, MemIC, MemType, CourseFaculty,
Borrow, Due)

frmHistory has the following text boxes: MemName, Borrow, Due

When a record is selected from cboMember, the 1st 5 text boxes are
updated with the details in the combo box and the last 2 text boxes
are updated to display the current date and the date of the 7th day
from the current date.

I would like to push these data into the text boxes in frmHistory
(with the exception of MemNo, MemIC, MemType, and CourseFaculty). How
do I do this? I could only come up with the follwing codes but I do
not know how to use them:

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Dim rst as RecordSet

rst.AddNew
rst.MemName = Me.txtMemName
rst.Borrow = Me.txtBorrow
rst.Due = Me.txtDue
rst.Update

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


Are both forms open? If so whenever you want this to happen run
the follwing code from frmBorrow.

with forms("frmHistory")
!MemName = Me.txtMemName
!Borrow = Me.txtBorrow
!Due = Me.txtDue
end with


Dear folks.
I neglected to mention that frmHistory is a continuos form, and that I
would like to push the data into a new record. So altho rkc's coding
works, it unfortunately modified the record to which the record
selector is pointed to. Sorry for the inconvenience.
Nov 13 '05 #3
rkc

"Aravind" <so**********@hotmail.com> wrote in message
news:61**************************@posting.google.c om...
"rkc" <rk*@yabba.dabba.do.rochester.rr.bomb> wrote in message

news:<YQ*******************@twister.nyroc.rr.com>. ..
"Aravind" <so**********@hotmail.com> wrote in message
news:61**************************@posting.google.c om...
I would like to push these data into the text boxes in frmHistory
(with the exception of MemNo, MemIC, MemType, and CourseFaculty). How
do I do this? I could only come up with the follwing codes but I do
not know how to use them:

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Dim rst as RecordSet

rst.AddNew
rst.MemName = Me.txtMemName
rst.Borrow = Me.txtBorrow
rst.Due = Me.txtDue
rst.Update

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


Are both forms open? If so whenever you want this to happen run
the follwing code from frmBorrow.

with forms("frmHistory")
!MemName = Me.txtMemName
!Borrow = Me.txtBorrow
!Due = Me.txtDue
end with


Dear folks.
I neglected to mention that frmHistory is a continuos form, and that I
would like to push the data into a new record. So altho rkc's coding
works, it unfortunately modified the record to which the record
selector is pointed to. Sorry for the inconvenience.


So you want to put the data in a new record? It would help if you
would just say so.

Again. Assuming both forms are open at the same time, run the
following code from frmBorrow whenever you want this to happen.

'go to a new record on frmHistory
'will raise an error if frmHistory is not open
DoCmd.GoToRecord acDataForm, "frmHistory", acNewRec

'insert the current data
with forms("frmHistory")
!MemName = Me.txtMemName
!Borrow = Me.txtBorrow
!Due = Me.txtDue
end with



Nov 13 '05 #4
"rkc" <rk*@yabba.dabba.do.rochester.rr.bomb> wrote in message news:<oJ********************@twister.nyroc.rr.com> ...
"Aravind" <so**********@hotmail.com> wrote in message
news:61**************************@posting.google.c om...
"rkc" <rk*@yabba.dabba.do.rochester.rr.bomb> wrote in message

news:<YQ*******************@twister.nyroc.rr.com>. ..
"Aravind" <so**********@hotmail.com> wrote in message
news:61**************************@posting.google.c om...
> I would like to push these data into the text boxes in frmHistory
> (with the exception of MemNo, MemIC, MemType, and CourseFaculty). How
> do I do this? I could only come up with the follwing codes but I do
> not know how to use them:
>
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> Dim rst as RecordSet
>
> rst.AddNew
> rst.MemName = Me.txtMemName
> rst.Borrow = Me.txtBorrow
> rst.Due = Me.txtDue
> rst.Update
>
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Are both forms open? If so whenever you want this to happen run
the follwing code from frmBorrow.

with forms("frmHistory")
!MemName = Me.txtMemName
!Borrow = Me.txtBorrow
!Due = Me.txtDue
end with


Dear folks.
I neglected to mention that frmHistory is a continuos form, and that I
would like to push the data into a new record. So altho rkc's coding
works, it unfortunately modified the record to which the record
selector is pointed to. Sorry for the inconvenience.


So you want to put the data in a new record? It would help if you
would just say so.

Again. Assuming both forms are open at the same time, run the
following code from frmBorrow whenever you want this to happen.

'go to a new record on frmHistory
'will raise an error if frmHistory is not open
DoCmd.GoToRecord acDataForm, "frmHistory", acNewRec

'insert the current data
with forms("frmHistory")
!MemName = Me.txtMemName
!Borrow = Me.txtBorrow
!Due = Me.txtDue
end with


Thanks rkc, ur coding seems to work, but i'm getting the following error:

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Run-time error '3348':
Can't add record(s); join key of table 'history' not in recordset
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

What does it mean? Thanks.
Nov 13 '05 #5
rkc
Again. Assuming both forms are open at the same time, run the
following code from frmBorrow whenever you want this to happen.

'go to a new record on frmHistory
'will raise an error if frmHistory is not open
DoCmd.GoToRecord acDataForm, "frmHistory", acNewRec

'insert the current data
with forms("frmHistory")
!MemName = Me.txtMemName
!Borrow = Me.txtBorrow
!Due = Me.txtDue
end with


Thanks rkc, ur coding seems to work, but i'm getting the following error:

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Run-time error '3348':
Can't add record(s); join key of table 'history' not in recordset
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

What does it mean? Thanks.


Sounds to me like you still haven't told the whole story of what you are
doing.

We are talking about two different forms, right? We are not talking about
a Form with a subForm, Right?

Apparently the record source of your History form is not updateable.
Can you add a record manually inserting just the 3 fields you said you
were using?



Nov 13 '05 #6
"rkc" <rk*@yabba.dabba.do.rochester.rr.bomb> wrote in message news:<AE********************@twister.nyroc.rr.com> ...
Again. Assuming both forms are open at the same time, run the
following code from frmBorrow whenever you want this to happen.

'go to a new record on frmHistory
'will raise an error if frmHistory is not open
DoCmd.GoToRecord acDataForm, "frmHistory", acNewRec

'insert the current data
with forms("frmHistory")
!MemName = Me.txtMemName
!Borrow = Me.txtBorrow
!Due = Me.txtDue
end with


Thanks rkc, ur coding seems to work, but i'm getting the following error:

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Run-time error '3348':
Can't add record(s); join key of table 'history' not in recordset
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

What does it mean? Thanks.


Sounds to me like you still haven't told the whole story of what you are
doing.

We are talking about two different forms, right? We are not talking about
a Form with a subForm, Right?

Apparently the record source of your History form is not updateable.
Can you add a record manually inserting just the 3 fields you said you
were using?


Yes, I'm using 2 different forms. I cannot manually add data into the
3 felds in frmHistory because frmHistory is primarily for display
purposes only. To manipulate the data in frmHistory, I have to use
frmBorrow. fmHistory is based on a query (qryHistory), which in turn
is based on the table History. frmBorrow is a stand-alone form i.e.
not based on any query or table. The data I am inserting (using
frmBorrow) comes from 3 combo boxes with multiple columns, each column
corresponding to a text box. The data in 3 of these text boxes are
pushed into the 3 fields in frmHistory. I realise these are not the
best ways to do things, but unfortunately it is required. I'm not sure
if this answers your questions. I'm sorry for any inconvenience.
Nov 13 '05 #7
rkc

"Aravind" <so**********@hotmail.com> wrote in message
news:61**************************@posting.google.c om...
"rkc" <rk*@yabba.dabba.do.rochester.rr.bomb> wrote in message

news:<AE********************@twister.nyroc.rr.com> ...
> Again. Assuming both forms are open at the same time, run the
> following code from frmBorrow whenever you want this to happen.
>
> 'go to a new record on frmHistory
> 'will raise an error if frmHistory is not open
> DoCmd.GoToRecord acDataForm, "frmHistory", acNewRec
>
> 'insert the current data
> with forms("frmHistory")
> !MemName = Me.txtMemName
> !Borrow = Me.txtBorrow
> !Due = Me.txtDue
> end with

Thanks rkc, ur coding seems to work, but i'm getting the following error:
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Run-time error '3348':
Can't add record(s); join key of table 'history' not in recordset
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

What does it mean? Thanks.


Sounds to me like you still haven't told the whole story of what you are
doing.

We are talking about two different forms, right? We are not talking about a Form with a subForm, Right?

Apparently the record source of your History form is not updateable.
Can you add a record manually inserting just the 3 fields you said you
were using?


Yes, I'm using 2 different forms. I cannot manually add data into the
3 felds in frmHistory because frmHistory is primarily for display
purposes only. To manipulate the data in frmHistory, I have to use
frmBorrow. fmHistory is based on a query (qryHistory), which in turn
is based on the table History. frmBorrow is a stand-alone form i.e.
not based on any query or table. The data I am inserting (using
frmBorrow) comes from 3 combo boxes with multiple columns, each column
corresponding to a text box. The data in 3 of these text boxes are
pushed into the 3 fields in frmHistory. I realise these are not the
best ways to do things, but unfortunately it is required. I'm not sure
if this answers your questions. I'm sorry for any inconvenience.


You can't inconvenience me. Nobody is twisting my arm to sit and read
this stuff.

Unfortunately I have taken my best shot at trying to understand what
you are doing and why it isn't working.

Your latest post doesn' t give me any more to go on.

Nov 13 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
5559
by: Jayjay | last post by:
I've got a report that has a series of unbound text boxes that are being populated by some variables in code. The format is supposed to be a currancy format, but on a certain series of boxes, I...
1
3403
by: Rob NYS | last post by:
I have a bound form for employee evaluations. This form brings in the Name, Employee Number, SSN etc. I have 8 unbound text boxes for evaluation info to be entered into. From my understanding these...
4
1915
by: Bill Stock | last post by:
The few times in the past that I've loaded unbound data, I've tended to cheat and use temp tables (not really unbound) or use code for small datasets. I'm currently involved in a project that...
7
16340
by: PW | last post by:
Hi, I have a form with unbound fields on it. The user selects a record from a recordset and I populate the unbound fields. When I try to change the unbound quantity text box, Access 2003 tells...
10
3737
by: Gerhard | last post by:
Hi, all I run into the same problem on Access 2000 and 2003. Hopefully someone can replicate it – or not. 1. Create an unbound form – call it Form1. 2. Insert two unbound text boxes –...
3
1542
by: bronen | last post by:
I need a step by step instruction to do the following (i'm a beginner): 1) I have a form with two unbound text boxes. ProjectNumber, ProjectName 2) I have a form called "GoTeam" with two...
4
3293
theaybaras
by: theaybaras | last post by:
Hi everyone, You've all been such a huge help to me since joining, and I'd just like to take a second to let you know how much I appreciate it! That said, I have another supplication! ;) I have...
4
2261
by: Andrew Meador - ASCPA, MCSE, MCP+I, Network+, A+ | last post by:
I have created a report. This report needs to display records between two dates entered by the user. I put two text boxes on the report so I can enter the start and end date - I set them to use an...
7
3638
by: HSXWillH | last post by:
I am designing an inventory system and am stuck on a potential problem. I have a table of Stock_Catalog containing the following fields: Stock_ID (random autonumber), Full_Desc, Serial, Auto,...
0
6991
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
6878
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7373
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5456
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4897
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3078
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1405
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
649
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
286
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.