Default Values

DreamGenius

Annoying Questionner
Local time
Today, 08:08
Joined
Jul 29, 2004
Messages
116
I have a table, which is a local copy of a linked Oracle table, where one of the fields is a unique record number.

I've built a form which enables people to edit the local table, changes being posted to the linked table on closing the database.

I'm having difficulty building an expression in the default value field that will add the next unique record number to any new line added.

= Max (Field_Name) + 1 just returns 1 (and there are 655 records in the table) whilst = (Select (Max (Field_Name) from Table) + 1) returns #Name?!

Help, please? :(
 
Can you use dmax()?

Can you not just give the user direct access to the oracle table?

kh
 
KenHigg said:
Can you use dmax()?
Can you not just give the user direct access to the oracle table?
I'll explore DMax(), for which thanks.

I'd rather not let them have access to the main table until I've got some kind of backup to undo their mistakes!
 
Last edited:
Sorted - Thanks

=DMax("FIELD","TABLE")+1 worked a treat, once I'd got the syntax correct. The Expression Builder isn't a lot of cop for this is it? Better to use the Internet!
 
Cool. Just wondering how you manage multiple users updating snapshots of the original data...

kh
 
DreamGenius said:
=DMax("FIELD","TABLE")+1 worked a treat, once I'd got the syntax correct. The Expression Builder isn't a lot of cop for this is it? Better to use the Internet!


Did you try 'Help' inside the builder wizard? I use it from time to time...

kh
 
KenHigg said:
Cool. Just wondering how you manage multiple users updating snapshots of the original data...
It's for a team of four, very untechnical, people. The database will be restricted to one of them using it at a time.

I'll try the help in the Expression Builder - I just got a little disheartened when the main Access help didn't recognise DMax()!
 
If you open a module (code) window, like you're going to write code, then use that help, you will get better results...

kh
 

Users who are viewing this thread

Back
Top Bottom