Link to home
Start Free TrialLog in
Avatar of muthiahmerchant
muthiahmerchant

asked on

detect addnew()

hi all

I have a button called save. onclick of this button i save the current record and then automatically do a addnew so that all the fields are blank and the user can add a new one and click on save again. if the user click save again it creates another blank record.

how do i detect if an empty record is already in there or not.
Avatar of The_Biochemist
The_Biochemist

you can query the database for a record which has a null value where you would normally have a value. If the number of records in the dataset is greater than 0 then there is one (or more) else you need to create one.

Happy coding!
ASKER CERTIFIED SOLUTION
Avatar of eventprostrategies
eventprostrategies

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial