Hi,
I have a main form that calls a subform when the user clicks the add button. The user then will fill up the subform and once the user clicks the ok button the values are stored in public variables. The subform will then be released and will go back to the main form to add the entry. Here is the code of the main form:
DO FORM additem_temp With 1,""
Select item_temp1
=Requery("item_temp1")
If Seek(pvItemid,"item_temp1","itemid")
Messagebox("Code is already in use. Please specify a different code.")
thisform.nI_itemid.SetFocus()
Else
Insert Into bbfs!item_temp(itemid, itemdesc)Values(pvItemid, pvItemdesc)
Select item_temp1
=Requery("item_temp1")
thisform.ni_sysgrid1.SetFocus()
Endif
thisform.ni_sysgrid1.Refresh()
**************************************************************************
*Item_temp is my base table and Item_temp1 is the alias of the remoteview*
**************************************************************************
The problem here is that when I requery item_temp1, the record i inserted was not in the list. But when i browse the base table, the item was already there.
A more weird thing is that everytime i inserted the set step on command at the beginning of the code, for me to see if there are necessary codes that i ommitted, the program works fine.
What seems to be the problem?
Thanks in advance...
Music Rocks
www.musicreserve.blogspot.comSuccess is 1% Inspiration & 99% Perspiration
God Sometimes Delays His Help to Test Our Faith and Energize Our Prayers
Our Boat May Be Tossed While He Sleeps, But He Wakes Up Before it Sinks.