Uniqe number

  • Thread starter ZZZZZzzzzzZZZZZ
  • Start date
Z

ZZZZZzzzzzZZZZZ

Hello

I got a table that looks something like:
<pre>
menuID caption parentID seq
1 Books 0 1
2 Tables 0 2
3 English 1 1
4 Spanish 1 2
</pre>
This give me the option to build the menu in HTML (I don't think it's the
best way but this what I could think of) and when I want to enter the next
menu item under books, I need to find out what is the biggest seq value where
parented=1 and insert that number to the insert query.

Can anyone help?

Sagi
 
J

John Spencer

Can you use DMax?

DMax("SEQ","YourTable","ParentID =1")


--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
J

John W. Vinson

Hello

I got a table that looks something like:
<pre>
menuID caption parentID seq
1 Books 0 1
2 Tables 0 2
3 English 1 1
4 Spanish 1 2
</pre>
This give me the option to build the menu in HTML (I don't think it's the
best way but this what I could think of) and when I want to enter the next
menu item under books, I need to find out what is the biggest seq value where
parented=1 and insert that number to the insert query.

Can anyone help?

Sagi

Wnat's the context, Sagi? Are you using a Microsoft Access database (which
does not support html), an Access Data Project with the data in SQL/Server, or
something else? Note that this newsgroup is for questions about Access - if
you're using some other software you may want to find a more appropriate
newsgroup.

John W. Vinson [MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top