check if field is null, else copy row in table

  • Thread starter Thread starter OTWarrior via AccessMonster.com
  • Start date Start date
O

OTWarrior via AccessMonster.com

I have a form that loads a row from and table in then exits (immediately
saving the data). But when it loads, it adds a value to one of the fields.

the reason for this form is to add one of the unqiue indeifiers to a row in
the table, however at present, it overrides the previous information (meaning
I can only have the latest value in the table)

obviously i would need to check for a null, but if it isn't a null, then how
do i copy the the next row in the table?
 
I have a form that loads a row from and table in then exits (immediately
saving the data). But when it loads, it adds a value to one of the fields.

the reason for this form is to add one of the unqiue indeifiers to a row in
the table, however at present, it overrides the previous information (meaning
I can only have the latest value in the table)

obviously i would need to check for a null, but if it isn't a null, then how
do i copy the the next row in the table?

You can use the IsNull funciton to check for nulls:

If IsNull(SomeValue) Then DoSomething

If you'll provide a code sample, perhaps we an help ..

Also: How do you define the "next row" in your database? Access has no concept of "next" or "previous" row in a table.
Unless you've opened a query with an ORDER BY clause then it's hard to say what the "next" row is ...

Scott McDaniel
scott@takemeout_infotrakker.com
www.infotrakker.com
 
Scott said:
You can use the IsNull funciton to check for nulls:

If IsNull(SomeValue) Then DoSomething

If you'll provide a code sample, perhaps we an help ..

Also: How do you define the "next row" in your database? Access has no concept of "next" or "previous" row in a table.
Unless you've opened a query with an ORDER BY clause then it's hard to say what the "next" row is ...

Scott McDaniel
scott@takemeout_infotrakker.com
www.infotrakker.com

Ta for the code, but i already know how to do nulls, the issue is to add a
new line in the table based upon the line that is fed into the form.

In other words, if the value of the unique ID is null, then continue. If the
if the value of the unique ID contains a value, then add a new row to the
table, with the details loaded onto the form.
 
Back
Top