Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Locate not working right
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00669297
Message ID:
00669329
Views:
21
No I wasn't, that got rid of my open dialog box, but my fields still don't refresh to the new located record. I still must be missing something.

thanks
Nick Patel

>Hi,
>
>The form/procedure you called to add the new record probably closed the view. Are you using Private data sessions?
>
>HTH,
>Arriyel
>
>>I have a pageframe that contains 3 different views. On one of the pageframes I have a add button that allows the user to go to different form and add new vehicle assignment info. After the person adds the info it returns back to pageframe. On the pageframe I want to locate the last record I just added on another form. The view that I am using is lv_veh_assign. The view consists of a unique field call lv_veh_assign.uniqueid (.f), and another field that holds the master record id called a_id (.a) and other vehicle assignment fields. I am using the locate button to find the last record added from an area. I have the correct record in the array, but when I go to located it, I get a dialog box wanting me to locate the table. I do have the view in my data enviroment (lv_veh, lv_ser, lv_veh_assign) and my other pageframes use other views. When I am doing a locate I am explictly ask it to locate the record from lv_veh_assign view, why am I get the OPEN dialog box to locate table? The
>>following is the add button code.
>>
>>
>>
>>WITH thisform
>>	hrecno = RECNO()
>>	.visible = .f.
>>	DO FORM add_assign WITH  .a  && .a is master rec id
>>	.visible = .t.
>>	lc_id = .a
>>	REQUERY('lv_veh_assign')
>>	lvassign = RECCOUNT('lv_veh_assign')
>>	IF lvassign > 0
>>		SELECT MAX(lv_veh_assign.a_uniqueid) FROM lv_veh_assign ;
>>			WHERE lv_veh_assign.a_id = .a INTO array a__gen12
>>		.f = a__gen12(1,1) && .f is the uniqueid for lv_veh_assign
>>		LOCATE FOR lv_veh_assign.a_uniqueid = .f.
>>		RELEASE a__gen12
>>		.f = lv_veh_assign.a_uniqueid
>>		.pf1.p3.cmddelassign.visible = .t.				
>>		.pf1.p3.refresh()
>>	ELSE
>>		.pf1.p3.cmddelassign.visible = .f.
>>	ENDIF
>>endwith
>>
>>
>>thanks
>>Nick Patel
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform