Subject Inserting new record and using a unique generated number - help
Author bossman@i4free.co.nz
problem:

got a table for ease of typing say 3 feilds like those below

SET SQL DIALECT 1;

DEFAULT CHARACTER SET ASCII */
/* Domain definitions */
CREATE DOMAIN CUSTNUM AS INTEGER;
CREATE DOMAIN ORDERNUM AS INTEGER;

/* Table: CUSTOMERS, Owner: SYSDBA */

CREATE TABLE CUSTOMERS
(
LASTNAME CHAR(30) CHARACTER SET ASCII,
FIRSTNAME CHAR(30) CHARACTER SET ASCII,
HOMEPHONE CHAR(15) CHARACTER SET ASCII,
CUSTNUM NUMERIC(9, 0)
);

CREATE GENERATOR CUSTNUM_GEN;


/* Triggers only will work for SQL triggers */

CREATE TRIGGER SET_CUSTNUM FOR CUSTOMERS
ACTIVE BEFORE INSERT POSITION 0
AS
BEGIN
NEW.CUSTNUM = GEN_ID(CUSTNUM_GEN, 1);
END
^

COMMIT WORK ^
SET TERM ;^

now what i want to do is...

every time a new record is inserted to have the trigger shown fire
and place a new unique number in the field. so far i've not had any
success.

I've looked at the help files i've got (in pdf format) and took the
example they showed for creating a trigger and renamed the field they
used to my fieldname. This i thought would be all i'd need to do but
it's proven wrong.

What is it that I'm missing ?