Information générale
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Re: Cannot get the textbox to show the correct infomration
I created a formset that has two forms (form1 and form2) which uses 3 tables (table1, table2, and table3). The contents of the three tables are as follows.
Table1: member_name, member_id
Table2: member_id, chapter, begin_date, end_date, daily_id
Table3: daily_id, service_date, treatment, cost
Table1 has a one-to-many relationship with table2 (member_id) and table2 has a one-to-many relationship with table3 (daily_id). Form1 shows the daily record of the member, plus the member_name, member_id, and chapter from table1 and table2. I have no problem in showing those information. Form2 allows the user to add a daily record for a particular member. The user input the member's name and the date, and the program I wrote will append a record in table3, update the daily_id and service_date, release form2 and go back to form1. Here comes the problem. When I go back to form1, only the service_date is shown, and all other textboxes are shown in blank. However, when I move to another record and go back, all the text boxes are showing the correct information.
After updating daily_id and service_date, I have the following code.
thisform.enabled=.F.
thisform.visible=.F.
WITH thisformset.form1
.refresh()
.enabled=.T.
.activate
.show
ENDWITH
Can anyone show me how I can get the form show the updated information? (I am using optimistic table buffering.)
Chu
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement