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

How to either programatically reset AutoNumber or simulate autonumber in a temporary table

P: n/a
I use a temporary table to assemble unrelated data for specific forms and
reports. After each use of this table, I have a delete query which empties
the table out for its next use.

I have one field I want to populate with the record number as it appears in
the form. That way I can use a comparison with Me.CurrentRecord to change
the background color of the text boxes for the OnCurrent property. I'm
doing this because I want the record selector turned off. I don't like the
way it looks. I'd rather have the current row a different color. I got a
different idea for this in a different post yesterday and it looked
interesting, but I'm guessing there is another way that is closer the the
way I'm thinking.

AutoNumber doesn't reuse the sequential numbers, so either I'll need to
reset the field every time I use it, or, if this isn't possible, I would be
willing to make a numberical field and write some code to repopulate it
every time it is used. I'm not sure how that code would look.

Any thoughts on how to approach this? Maybe there is a completely different
idea out there that is better.

Thanks.

Rich Hollenbeck
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
You might want to look at conditional formatting; this could solve the whole
thing without worrying about numbers.

After all, what's going to happen if a user resorts the records in the form?
"Richard Hollenbeck" <ri****************@verizon.net> wrote in message
news:RWUMd.9141$Dc.1542@trnddc06...
I use a temporary table to assemble unrelated data for specific forms and
reports. After each use of this table, I have a delete query which empties the table out for its next use.

I have one field I want to populate with the record number as it appears in the form. That way I can use a comparison with Me.CurrentRecord to change
the background color of the text boxes for the OnCurrent property. I'm
doing this because I want the record selector turned off. I don't like the way it looks. I'd rather have the current row a different color. I got a
different idea for this in a different post yesterday and it looked
interesting, but I'm guessing there is another way that is closer the the
way I'm thinking.

AutoNumber doesn't reuse the sequential numbers, so either I'll need to
reset the field every time I use it, or, if this isn't possible, I would be willing to make a numberical field and write some code to repopulate it
every time it is used. I'm not sure how that code would look.

Any thoughts on how to approach this? Maybe there is a completely different idea out there that is better.

Thanks.

Rich Hollenbeck

Nov 13 '05 #2

P: n/a
The way my application is set up, the end user will have neither the need,
nor the opportunity, to sort these records on this form. I did look at
conditional formatting, but didn't arrive at a decent expression to find out
if this is the current record. However, I did find a website with the
answer I'm seeking: http://www.mvps.org/access/forms/frm0047.htm. I'm
going there right now to see how this works. Thanks for your reply.

Rich Hollenbeck
"MacDermott" <ma********@nospam.com> wrote in message
news:Le****************@newsread3.news.atl.earthli nk.net...
You might want to look at conditional formatting; this could solve the whole thing without worrying about numbers.

After all, what's going to happen if a user resorts the records in the form?

"Richard Hollenbeck" <ri****************@verizon.net> wrote in message
news:RWUMd.9141$Dc.1542@trnddc06...
I use a temporary table to assemble unrelated data for specific forms and reports. After each use of this table, I have a delete query which

empties
the table out for its next use.

I have one field I want to populate with the record number as it appears

in
the form. That way I can use a comparison with Me.CurrentRecord to change the background color of the text boxes for the OnCurrent property. I'm
doing this because I want the record selector turned off. I don't like

the
way it looks. I'd rather have the current row a different color. I got a different idea for this in a different post yesterday and it looked
interesting, but I'm guessing there is another way that is closer the the way I'm thinking.

AutoNumber doesn't reuse the sequential numbers, so either I'll need to
reset the field every time I use it, or, if this isn't possible, I would

be
willing to make a numberical field and write some code to repopulate it
every time it is used. I'm not sure how that code would look.

Any thoughts on how to approach this? Maybe there is a completely

different
idea out there that is better.

Thanks.

Rich Hollenbeck


Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.