By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,122 Members | 906 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,122 IT Pros & Developers. It's quick & easy.

How to get value from a query or table?

P: n/a
Hello,

I'm kinda new to this, and any help would be very welcome.

When I open a form (which is linked to table A), I want to perform a query
on that same table.

I need to know the max of field 'HUB' and want to add it with 1. This
value(MyVar) I want to show on the form, so that I know which HUB number I
can enter. (I'm not working with autonum on this table).

Which script do I have to write.

It is something like:

MyVar = Max(TableA.HUB)+1
Thanks for your time and attention.
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"TTD_hck" <tt*@hotmail.com> wrote in message
news:bl***********@beast.euro.net...
Hello,

I'm kinda new to this, and any help would be very welcome.

When I open a form (which is linked to table A), I want to perform a query
on that same table.

I need to know the max of field 'HUB' and want to add it with 1. This
value(MyVar) I want to show on the form, so that I know which HUB number I
can enter. (I'm not working with autonum on this table).

Which script do I have to write.

It is something like:

MyVar = Max(TableA.HUB)+1
Thanks for your time and attention.

Try the DMAX function:

=DMax("[HUB]","TableA") + 1
Fletcher

Nov 12 '05 #2

P: n/a
Thanks,

works very well.
"Fletcher Arnold" <fl****@home.com> schreef in bericht
news:bl**********@sparta.btinternet.com...
"TTD_hck" <tt*@hotmail.com> wrote in message
news:bl***********@beast.euro.net...
Hello,

I'm kinda new to this, and any help would be very welcome.

When I open a form (which is linked to table A), I want to perform a query on that same table.

I need to know the max of field 'HUB' and want to add it with 1. This
value(MyVar) I want to show on the form, so that I know which HUB number I can enter. (I'm not working with autonum on this table).

Which script do I have to write.

It is something like:

MyVar = Max(TableA.HUB)+1
Thanks for your time and attention.

Try the DMAX function:

=DMax("[HUB]","TableA") + 1
Fletcher

Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.