473,569 Members | 2,844 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

bound continuous form becoming unsynchronized (help)

I am having a problem an it's driving me crazy, I hope someone can
correct my technique. I can't find a pattern and don't know where to
look to debug this. The problem is on a continuous form, the rows seem
to become unsynchronized. From lack of experience I am probably doing
something wrong. Let me explain...

I have a select query which joins 2 tables, an Appointment table and
Payments table and presents the data as rows on the bound form. The
idea is to generate a list of appointments and allow entry of data to
the appointment table and record payment in payment table. The join is
right a right join on Payments since most times the row does not exist.
The payment table contains a customerID column as does the appointment
table. In order to populate the customerID column on the payment table
I do the following in the afterUpdate event of the text box that
records the payment amount.

Me.[Payments.custom erID] =
Me.recordSet.Fi elds.Item("clea nings.customeri d")

The problem is that sometime the payments.custom erID column contains
the wrong customerID. Often it's the customerID of the row right above
it. The form allows for deletion of rows as well as a button to
refresh the recorderset, but the problem seems to occur even if no
deletes or refresh takes place.

Thanks!
-Elie.

Sep 12 '06 #1
6 1694

Welie wrote:
I am having a problem an it's driving me crazy, I hope someone can
correct my technique. I can't find a pattern and don't know where to
look to debug this. The problem is on a continuous form, the rows seem
to become unsynchronized. From lack of experience I am probably doing
something wrong. Let me explain...

I have a select query which joins 2 tables, an Appointment table and
Payments table and presents the data as rows on the bound form. The
idea is to generate a list of appointments and allow entry of data to
the appointment table and record payment in payment table. The join is
right a right join on Payments since most times the row does not exist.
The payment table contains a customerID column as does the appointment
table. In order to populate the customerID column on the payment table
I do the following in the afterUpdate event of the text box that
records the payment amount.

Me.[Payments.custom erID] =
Me.recordSet.Fi elds.Item("clea nings.customeri d")

The problem is that sometime the payments.custom erID column contains
the wrong customerID. Often it's the customerID of the row right above
it. The form allows for deletion of rows as well as a button to
refresh the recorderset, but the problem seems to occur even if no
deletes or refresh takes place.
I am afraid that this design may cause you more problems in the future.
I am assuming you want to tie each payment to a specific appointment
and that there may be more than one payment entered for a specific
appointment. You may want to change your design to a form/subform
arrangement where you have a main form bound to the appointments table
and then a subform on that form which is bound to the payments table.
Users could use the appointments form to navigate to the correct
appointment and then enter one or more payments into the subform.

Bruce

Sep 12 '06 #2
Bruce,
Thx for your reply. It's possible that there is a better design, but in
this case there is a one to one relationship between an appointment and
payment. Each appointment can have only payment. I could still do a
subform but I thought this design was simpler in terms of navigation.
To the user they just need to tab from column to column and then to the
next row.

Thanks.

deluxeinformat. ..@gmail.com wrote:
>
I am afraid that this design may cause you more problems in the future.
I am assuming you want to tie each payment to a specific appointment
and that there may be more than one payment entered for a specific
appointment. You may want to change your design to a form/subform
arrangement where you have a main form bound to the appointments table
and then a subform on that form which is bound to the payments table.
Users could use the appointments form to navigate to the correct
appointment and then enter one or more payments into the subform.

Bruce
Sep 12 '06 #3
Well, given what you've said, I think the best idea is that you don't really
need to store the customerID in the payments table. If there really is a one
to one relationship, then every payment knows its appointmentID (I'm
assuming you joined the tables on AppointmentID, no?) and can therefore see
the customerID of that appointment. To get a list of all payments with their
customerID's, just make a query that joins payments to appointments (inner
join this time) and include the appointments.cu stomerID field.

But if you really need to set the customerID field in your other table, you
could get the value from the form instead of trying to get it from the
recordset. You could have an invisible customerID control in the
appointments part that's called txtInvisibleID and another control that's
bound to the customerID field in the payments table, and say
me.txtPaymentID = me.txtInvisible ID
(assuming the appointments.cu stomerID would already have it's value)

hope this helps
-John

"Welie" <we******@gmail .comwrote in message
news:11******** **************@ h48g2000cwc.goo glegroups.com.. .
Bruce,
Thx for your reply. It's possible that there is a better design, but in
this case there is a one to one relationship between an appointment and
payment. Each appointment can have only payment. I could still do a
subform but I thought this design was simpler in terms of navigation.
To the user they just need to tab from column to column and then to the
next row.

Thanks.

deluxeinformat. ..@gmail.com wrote:
>>
I am afraid that this design may cause you more problems in the future.
I am assuming you want to tie each payment to a specific appointment
and that there may be more than one payment entered for a specific
appointment. You may want to change your design to a form/subform
arrangement where you have a main form bound to the appointments table
and then a subform on that form which is bound to the payments table.
Users could use the appointments form to navigate to the correct
appointment and then enter one or more payments into the subform.

Bruce

Sep 13 '06 #4

Welie wrote:
Bruce,
Thx for your reply. It's possible that there is a better design, but in
this case there is a one to one relationship between an appointment and
payment. Each appointment can have only payment. I could still do a
subform but I thought this design was simpler in terms of navigation.
To the user they just need to tab from column to column and then to the
next row.
Perhaps it would make sense to combine the two tables into a single
table? If that is not practical then perhaps you should bind your
continuous form to the appointments table only and then have some
unbound fields on the appointment form in which to enter the payment
information. You could then update the payments table in code from the
after update event(s) of the unbound fields.

Bruce

Sep 13 '06 #5
John-

Thanks. I do need to keep the customerID in the payment table becuase
payments could come from sources other then cleanings.

However your second idea is probably the way I need to go. I am not
sure why I decided to access the customerID from the recordset. But is
it possible that the recordset would not match up with the form? I
still don't understand why this would happen.

In general what is the relationship between the results on the form and
the recordset? I know that the recordset is the base source of the
form, but I didn't think it was possible for them to have different
bookmarks.

John Welch (remove remove) wrote:
Well, given what you've said, I think the best idea is that you don't really
need to store the customerID in the payments table. If there really is a one
to one relationship, then every payment knows its appointmentID (I'm
assuming you joined the tables on AppointmentID, no?) and can therefore see
the customerID of that appointment. To get a list of all payments with their
customerID's, just make a query that joins payments to appointments (inner
join this time) and include the appointments.cu stomerID field.

But if you really need to set the customerID field in your other table, you
could get the value from the form instead of trying to get it from the
recordset. You could have an invisible customerID control in the
appointments part that's called txtInvisibleID and another control that's
bound to the customerID field in the payments table, and say
me.txtPaymentID = me.txtInvisible ID
(assuming the appointments.cu stomerID would already have it's value)

hope this helps
-John
Sep 14 '06 #6

Good questions Welie-
I'm not sure why you had that problem, but a hunch might be that somehow
when the after update event fired, the bookmark was still on the previous
record?? Does the bookmark not move until the record is saved (not dirty any
more)?? Just making stuff up, but ?? You could test it by putting a message
box in the after update event like this:
msgbox Me.recordSet.Fi elds.Item("clea nings.customeri d")
to see what happens
-john
>
However your second idea is probably the way I need to go. I am not
sure why I decided to access the customerID from the recordset. But is
it possible that the recordset would not match up with the form? I
still don't understand why this would happen.

In general what is the relationship between the results on the form and
the recordset? I know that the recordset is the base source of the
form, but I didn't think it was possible for them to have different
bookmarks.

John Welch (remove remove) wrote:
>Well, given what you've said, I think the best idea is that you don't
really
need to store the customerID in the payments table. If there really is a
one
to one relationship, then every payment knows its appointmentID (I'm
assuming you joined the tables on AppointmentID, no?) and can therefore
see
the customerID of that appointment. To get a list of all payments with
their
customerID's , just make a query that joins payments to appointments
(inner
join this time) and include the appointments.cu stomerID field.

But if you really need to set the customerID field in your other table,
you
could get the value from the form instead of trying to get it from the
recordset. You could have an invisible customerID control in the
appointments part that's called txtInvisibleID and another control that's
bound to the customerID field in the payments table, and say
me.txtPaymentI D = me.txtInvisible ID
(assuming the appointments.cu stomerID would already have it's value)

hope this helps
-John
>

Sep 15 '06 #7

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

Similar topics

3
7902
by: Mark | last post by:
Hi there, I have a subform, set as a continuous form. When a user selects a particular record in that subform, how can I make that particular record stand out (color or font change, size, etc) from the other records in the list? Thank you in advance, Mark
19
4078
by: James Fortune | last post by:
I have a lot of respect for David Fenton and Allen Browne, but I don't understand why people who know how to write code to completely replace a front end do not write something that will automate the code that implements managing unbound controls on forms given the superior performance of unbound controls in a client/server environment. I can...
6
2596
by: Rose | last post by:
I have set my form's default view property to continuous forms and have added a field for the table columns I wish to view. What do I need to do to allow more than one record to show at the same time... like in a list?
11
3544
by: Doug Bell | last post by:
Hi, I am trying to create form that displays data like an Access continuous dataform rather than using a data grid. I am thinking that I can achieve this by creating a row of text boxes, one for each field I need to display. The creating a controls array for the first n records I show and populate the text boxes. Then setting up a vertical...
1
2765
by: tizmagik | last post by:
I have a combobox on a continuous form that has a recordsource that is set upon Form_Load event via VBA (based on initial form data and external form data entered). For data entry purposes the Combobox's value is saved to *another* field (text-field) in the appropriate table (this text-field is not visible in the Continuous Form); so the...
1
4855
by: Bill | last post by:
Problem: Combo box data disappears from view when a requery is done See "Background" below for details on tables, forms & controls On a form, I want to use the setting of bound combo box C1 to limit what is displayed in bound combo box C2. When I display Tbl-A records on a continuous form, and navigate away from record 1 to record 2,...
2
1697
by: prakashwadhwani | last post by:
I have a continuous form bound to an underlying table. How do I change the value of one field (all rows) to a particular constant say eg. 1998. Someone on the Group here mentioned I should not use a the RunSQL command to modify a bound form. If so, what are my alternatives ?
12
2849
by: hlebforprimeminister | last post by:
Hi I want to filter records on a continuous form(FRM_SUPPT) by one of the fields, SW_ID. FRM_SUPPT has a text box ( bound to SW_ID) and two drop-down lists that are bound also. The three together are joint primary keys. I need to be able to view data and enter it on this form. Now the default value of the SW_ID textbox is from a textbox...
8
11638
by: Steffen Beck | last post by:
Hi NG I need some help with a problem on my forms. If I have 2 related tables, for instance companies and employees, and want to display all companies on a continuous form with their employees on a sub form as another continuous form, as shown below
0
7612
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7922
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8119
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7668
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6281
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5509
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5218
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3637
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
936
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.