PC Review


Reply
Thread Tools Rate Thread

DMax question

 
 
=?Utf-8?B?U2N1ZGE=?=
Guest
Posts: n/a
 
      12th Oct 2006
Hello, all. I am trying to have a specific number increment by one every time
a Add New Record is clicked on my form (single form).

On the form button I have: DMax("[SENE CASE #]","[SENE Sar Log]")+1 in
the default value (I have 13 records in there already)

My text box is named SENE CASE # and my table is named SENE Sar Log. When I
click Add New Record I am just getting #error.

Can anyone tell me what I am doing wrong?

Thanks!


 
Reply With Quote
 
 
 
 
Al Campagna
Guest
Posts: n/a
 
      12th Oct 2006
Scuda,
I'd avoid the # in field names. This is a symbol used in DATE values, and could be
causing the problem.
Try SeneCaseNo instead.

Remove brackets from the table name.

You wrote...
> My text box is named SENE CASE # and my table is named SENE Sar Log.

**SeneCaseNo should be a Numeric field.**

Also, avoid spaces in field names... it makes coding a lot easier...

Try...
= DMax("[SeneCaseNo]","SENESarLog") + 1

--
hth
Al Campagna
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions


"Scuda" <(E-Mail Removed)> wrote in message
news:2D71A036-17C0-4473-BF71-(E-Mail Removed)...
> Hello, all. I am trying to have a specific number increment by one every time
> a Add New Record is clicked on my form (single form).
>
> On the form button I have: DMax("[SENE CASE #]","[SENE Sar Log]")+1 in
> the default value (I have 13 records in there already)
>
> My text box is named SENE CASE # and my table is named SENE Sar Log. When I
> click Add New Record I am just getting #error.
>
> Can anyone tell me what I am doing wrong?
>
> Thanks!
>
>



 
Reply With Quote
 
=?Utf-8?B?U2N1ZGE=?=
Guest
Posts: n/a
 
      12th Oct 2006
Thanks a million Al, I had read that if the table had spaces you should use
the brackets. I have since changed my naming practices.

Thanks again!

"Al Campagna" wrote:

> Scuda,
> I'd avoid the # in field names. This is a symbol used in DATE values, and could be
> causing the problem.
> Try SeneCaseNo instead.
>
> Remove brackets from the table name.
>
> You wrote...
> > My text box is named SENE CASE # and my table is named SENE Sar Log.

> **SeneCaseNo should be a Numeric field.**
>
> Also, avoid spaces in field names... it makes coding a lot easier...
>
> Try...
> = DMax("[SeneCaseNo]","SENESarLog") + 1
>
> --
> hth
> Al Campagna
> Candia Computer Consulting - Candia NH
> http://home.comcast.net/~cccsolutions
>
>
> "Scuda" <(E-Mail Removed)> wrote in message
> news:2D71A036-17C0-4473-BF71-(E-Mail Removed)...
> > Hello, all. I am trying to have a specific number increment by one every time
> > a Add New Record is clicked on my form (single form).
> >
> > On the form button I have: DMax("[SENE CASE #]","[SENE Sar Log]")+1 in
> > the default value (I have 13 records in there already)
> >
> > My text box is named SENE CASE # and my table is named SENE Sar Log. When I
> > click Add New Record I am just getting #error.
> >
> > Can anyone tell me what I am doing wrong?
> >
> > Thanks!
> >
> >

>
>
>

 
Reply With Quote
 
=?Utf-8?B?U2N1ZGE=?=
Guest
Posts: n/a
 
      12th Oct 2006
Ok, I have another question that is very related so I didn't think a new
thread was warranted, if I am wrong, I apologize.

What if I want to have a text bos that just DISPLAYS the Next Number. In
other words, if I click on Add New Record, and my SENE CASENO changes to say
15, which it is doing, I would like to have another box that says Mext Number
: 16.

What is the easiest way to accomplish that.

Thanks!

"Scuda" wrote:

> Thanks a million Al, I had read that if the table had spaces you should use
> the brackets. I have since changed my naming practices.
>
> Thanks again!
>
> "Al Campagna" wrote:
>
> > Scuda,
> > I'd avoid the # in field names. This is a symbol used in DATE values, and could be
> > causing the problem.
> > Try SeneCaseNo instead.
> >
> > Remove brackets from the table name.
> >
> > You wrote...
> > > My text box is named SENE CASE # and my table is named SENE Sar Log.

> > **SeneCaseNo should be a Numeric field.**
> >
> > Also, avoid spaces in field names... it makes coding a lot easier...
> >
> > Try...
> > = DMax("[SeneCaseNo]","SENESarLog") + 1
> >
> > --
> > hth
> > Al Campagna
> > Candia Computer Consulting - Candia NH
> > http://home.comcast.net/~cccsolutions
> >
> >
> > "Scuda" <(E-Mail Removed)> wrote in message
> > news:2D71A036-17C0-4473-BF71-(E-Mail Removed)...
> > > Hello, all. I am trying to have a specific number increment by one every time
> > > a Add New Record is clicked on my form (single form).
> > >
> > > On the form button I have: DMax("[SENE CASE #]","[SENE Sar Log]")+1 in
> > > the default value (I have 13 records in there already)
> > >
> > > My text box is named SENE CASE # and my table is named SENE Sar Log. When I
> > > click Add New Record I am just getting #error.
> > >
> > > Can anyone tell me what I am doing wrong?
> > >
> > > Thanks!
> > >
> > >

> >
> >
> >

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Really quick Nz(Dmax question NoviceNana Microsoft Access Form Coding 2 8th May 2007 02:21 PM
DMax Question =?Utf-8?B?TWVsaXNzYQ==?= Microsoft Access VBA Modules 2 6th Apr 2007 02:52 PM
DMax for dates in rpt group header returns DMax for entire records =?Utf-8?B?aGVsaW9z?= Microsoft Access Getting Started 1 19th Jul 2005 09:32 PM
DMAX Question Alan Smithee Scanners 42 8th May 2005 12:19 AM
DMax question =?Utf-8?B?Sk1vcnJlbGw=?= Microsoft Access 4 16th Dec 2004 05:29 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:47 PM.