Mike Yearwood
Toronto, Ontario, Canada
General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Something is still wrong.
I have a button to run the following code:
Local new_item
new_item = 0
Select Max(Val(fai_item_no)) As item_no From fai_items_required Where AllT(part_no) == AllT(ThisForm.Text1.Value) And AllT(drawing_rev) == AllT(ThisForm.Text2.Value) InTo Cursor myMaxItem
If reccount("myMaxItem") > 0
new_item = myMaxItem.item_no + 1
Else
new_item = 1
EndIf
InSert InTo fai_items_required(part_no, drawing_rev, fai_item_no, fai_index) ;
Values(ThisForm.Text1.Value, ThisForm.Text2.Value, AllT(Str(new_item)),ThisForm.Text19.Value)
fai_query = AllT(Str(pdm_var.fai_sub_index))+AllT(ThisForm.Text1.Value)+AllT(ThisForm.Text2.Value)
=Requery("fai_view_qa")
Select fai_view_qa
Go Bottom
ThisForm.Grid1.Column4.Edit1.SetFocus
As long as just click the button receords are added to the grid. However, if I add a record and then change on of the cell values, I can not add anoter record an I get the error listed on my last post.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only