dmax stop at 10 records

G

Guest

Hi All,

I have the following dmax on my form in the before insert event:

Me!vdrid = Nz(DMax("[vdrid]", "tblNewVendor") + 1

The vdrid field is a text field.

After adding a 1 to the next record, it stopped at 10.

How do I get it to continue to 11, 12, 13 etc.

Thank you all for your help.
 
T

tina

the simplest solution would be to change the vdrid field's data type from
Text to Number, with a size big enough to accommodate current and future
anticipated needs.

if you don't want to do that for some reason, try

Me!vdrid = CLng(Nz(DMax("[vdrid]", "tblNewVendor"), 0)) + 1

hth
 
G

Guest

Thank you Tina and Granny Spitz. I will give it a try.


tina said:
the simplest solution would be to change the vdrid field's data type from
Text to Number, with a size big enough to accommodate current and future
anticipated needs.

if you don't want to do that for some reason, try

Me!vdrid = CLng(Nz(DMax("[vdrid]", "tblNewVendor"), 0)) + 1

hth


Avaya said:
Hi All,

I have the following dmax on my form in the before insert event:

Me!vdrid = Nz(DMax("[vdrid]", "tblNewVendor") + 1

The vdrid field is a text field.

After adding a 1 to the next record, it stopped at 10.

How do I get it to continue to 11, 12, 13 etc.

Thank you all for your help.
 
G

Guest

Sorry, Tina. It doesn't work. It stopped at the 10 records. I need the
field type to be text.

tina said:
the simplest solution would be to change the vdrid field's data type from
Text to Number, with a size big enough to accommodate current and future
anticipated needs.

if you don't want to do that for some reason, try

Me!vdrid = CLng(Nz(DMax("[vdrid]", "tblNewVendor"), 0)) + 1

hth


Avaya said:
Hi All,

I have the following dmax on my form in the before insert event:

Me!vdrid = Nz(DMax("[vdrid]", "tblNewVendor") + 1

The vdrid field is a text field.

After adding a 1 to the next record, it stopped at 10.

How do I get it to continue to 11, 12, 13 etc.

Thank you all for your help.
 
G

Guest

Hi, I don't think that Tina's advice will make a different.
The best way is to change the field type to number just as Granny suggested,
bu if you have to keep the field as text, then the convert should be inside
the DMax

Me!vdrid = Nz(DMax("CLng([vdrid])", "tblNewVendor"), 0) + 1

--
Good Luck
BS"D


Avaya said:
Thank you Tina and Granny Spitz. I will give it a try.


tina said:
the simplest solution would be to change the vdrid field's data type from
Text to Number, with a size big enough to accommodate current and future
anticipated needs.

if you don't want to do that for some reason, try

Me!vdrid = CLng(Nz(DMax("[vdrid]", "tblNewVendor"), 0)) + 1

hth


Avaya said:
Hi All,

I have the following dmax on my form in the before insert event:

Me!vdrid = Nz(DMax("[vdrid]", "tblNewVendor") + 1

The vdrid field is a text field.

After adding a 1 to the next record, it stopped at 10.

How do I get it to continue to 11, 12, 13 etc.

Thank you all for your help.
 
G

Guest

Thank you Ofer Cohen for your help. It works beautifully.

Ofer Cohen said:
Hi, I don't think that Tina's advice will make a different.
The best way is to change the field type to number just as Granny suggested,
bu if you have to keep the field as text, then the convert should be inside
the DMax

Me!vdrid = Nz(DMax("CLng([vdrid])", "tblNewVendor"), 0) + 1

--
Good Luck
BS"D


Avaya said:
Thank you Tina and Granny Spitz. I will give it a try.


tina said:
the simplest solution would be to change the vdrid field's data type from
Text to Number, with a size big enough to accommodate current and future
anticipated needs.

if you don't want to do that for some reason, try

Me!vdrid = CLng(Nz(DMax("[vdrid]", "tblNewVendor"), 0)) + 1

hth


Hi All,

I have the following dmax on my form in the before insert event:

Me!vdrid = Nz(DMax("[vdrid]", "tblNewVendor") + 1

The vdrid field is a text field.

After adding a 1 to the next record, it stopped at 10.

How do I get it to continue to 11, 12, 13 etc.

Thank you all for your help.
 

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