Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dBase 5 for Windows form opening

Status
Not open for further replies.

Billyray520

Technical User
Feb 28, 2005
6
0
0
US
I am trying to open an "Orders" form from my "Customer" form. I have a browse object with the order numbers, so when I select one, the onclick property opens the correct order form.

The Customers form is modeless (I have the record navigation controls in the system menu bar) and the Orders form I have set as modal (no record navigation controls in the system menu.) I think I am supposed to create a session (in the header of the Orders form?) but I just can't seem to figure out how to get the orders form to open from the "onclick" property correctly, so that when I close the order form, and return to the same record in the customer form and it is modeless again. The samples database is very elaborate with an entire user menu and navigation controls in the form, but I don't need anything so elaborate. I almost have this idea working where the correct Orders form opens up modally, but when I close the orders form and return to the customer form, it is now become modal too.
 
Ok, this was very easy once I got all the pieces in place. First I decided against making the Orders form modal since it floated all over the screen which I didn't care for. Secondly, having the Orders form as modeless was not going to cause any integrity errors. So I just kept the MDI=.T. property on the Orders form. However, in the header of the form's program view I added the line "Create Sessions." Next in the "on double click" property of the browse object showing the different work orders for each customer in the Customer form, I added this simple code: cWO=TRIM(ORDER_NUMBER)/ORDERFORM="PATH OF ORDER FORM"/DO(ORDERFORM)/FIND &cWO/ cWO =""/

Once I had that working, I could start viewing different orders from different customers very easily. However I ran into a problem soon. Certain orders, which appeared in the browse object on the Customer Form could not be found by the Order form, or in other words a blank form was returned. I first suspected corrupted indexes, but that wasn't it. Then I suspected deleted records, but that wasn't it. Finally I found that it was due to the fact that on the orders form, I have two child forms/tables. One is order details, and the other is receipts. Turns out that there were some orders with no receipts. This is normal, since they were either records for cancelled orders, or current orders where payment still has not been made. I don't know if there is a fix for this or not, but I went in and corrected the matter by adding a receipt record to those orders who had none. But I would be curious to know if this is a dBase 5 problem or what? I use a QBE file to order the Orders tables with their related Details and Receipts.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top