hi to all,
i have a set named items
products is my primary table and categories is my lookup table linked 1:1
during enter mode of the primary table, when i add a category that is not in the list, when i hit save it tells me that category is blank but its not blank. see screen shot.
here is the code attached to the cmdSave button
but when categories form is opened (not in lookup), the code works fine.
why is this happen?
tia
edit: its already 1:07 (my time) here...
im dead tired and need some sleep.
will be back later this morning to read your posts..
thanks
i have a set named items
products is my primary table and categories is my lookup table linked 1:1
during enter mode of the primary table, when i add a category that is not in the list, when i hit save it tells me that category is blank but its not blank. see screen shot.
here is the code attached to the cmdSave button
Code:
'Date Created: 24-Aug-2009 07:16:46 AM 'Last Updated: 11-Jul-2010 08:56:03 PM 'Created By : Kiko 'Updated By : fdd 'Save record in current form. DIM mode as c mode = parentform.mode_get() 'If the form is in Enter or Change mode, first save the changes before closing the form if mode = "ENTER" .or. mode = "CHANGE" then if isblank("CATEGORY") then cancel() ui_msg_box("Required field", "Category is required. Please enter category to continue. ",UI_ATTENTION_SYMBOL+UI_OK) category.activate() else this.commit() 'Disable editing of records in current form. this.allow_change(.f.) msgbox("Alpha Five", "Record has been successfully saved.",UI_INFORMATION_SYMBOL+UI_OK) end if else ui_msg_box("Save failed", "No changes made to the record.",UI_ATTENTION_SYMBOL+UI_OK) this.allow_change(.f.) end if
why is this happen?
tia
edit: its already 1:07 (my time) here...
im dead tired and need some sleep.
will be back later this morning to read your posts..
thanks
Comment