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!

create new record based on current record 1

Status
Not open for further replies.

DanNorris2000

Technical User
Nov 10, 2000
186
0
0
US
I have a form that shows claim information. I have a command button on that form that by clicking will(should) create a new record based on the information in the current record.

* CMDADDSUBCLAIMA.CLICK
*
* Add a new Sub Claim
* Get next sub number for this claim

Select claims2
Store 0 to nNextSub
Locate for claims2.claim = thisform.claim.value
Do while found()
nNextSub = nNextSub + 1
Continue
Enddo
thisformset.newclaimA.clmsub.value = nNextSub
* Go to newclaim screen
thisformset.newclaimA.visible=.T.
thisformset.newclaimA.show

When run, newclaimA form never shows, it stays on the original claims screen. Any thoughts?

Object newclaimA has the following for its activate procedure:

thisformset.newclaima.uw.value = thisformset.form1.pageframe1.page1.uw.value
thisformset.newclaima.uw.refresh()
thisformset.newclaima.ctrprefix.value = thisformset.form1.pageframe1.page1.ctrprefix.value
thisformset.newclaima.ctrprefix.refresh()
THISFORMSET.Visible= .T.

 
If you step through it, is it reaching this code?:
Code:
thisformset.newclaimA.clmsub.value = nNextSub
* Go to newclaim screen
thisformset.newclaimA.visible=.T.
thisformset.newclaimA.show

Maybe it's getting caught in the do while loop.
Try changing it to:
Code:
SCAN FOR claims2.claim = thisform.claim.value
    nNextSub = nNextSub + 1
ENDSCAN

and see if it helps.



-Dave Summers-
[cheers]
Even more Fox stuff at:
 
thanks!
That helped with the exception that my newclaimA form is stuck under my main claim form.

 
On click:
* Go to newclaim screen
thisformset.newclaimA.visible=.T.
thisformset.newClaimA.WindowState= 0
thisformset.newclaimA.show

Form has
showwindow 2-As toplevel form
windowtype modeless

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top