S
SparrowCE
Need to assign/save a consecutive order number based on a
location site ID, then once the number is assigned, form is
opened so user can add further details against that number.
Example, each site has its own 6 digit number prefix,
starting number is 5000, so each new order for each new
site will be Prefix5000, Prefix5001, etc. Main form is a
drill down where user chooses appropriate site, once site
is chosen, filtered form opens assigning the number. I can
get the assign number form to open based on the SiteID
filter, but am unable to get it to automatically populate
SiteID and number prefix assigned to SiteID that would
automatically be combined with next consecutive number.
Once form opens it gets the next number, but the SiteID and
prefix are blank. Am needing them to default to the set
value for the SiteID chosen, then assign the number in
order for more data to be manually entered against it.
New number comes from below, field on form is set at
default to GetNextPackageNo().
Public Function GetNextPackageNo()
'gets next free Package Number
GetNextPackageNo = Nz(DMax("[PackageNo]", "[MasterDetail]")
+ 1, 1)
End Function
Would appreciate any help, thank you.
location site ID, then once the number is assigned, form is
opened so user can add further details against that number.
Example, each site has its own 6 digit number prefix,
starting number is 5000, so each new order for each new
site will be Prefix5000, Prefix5001, etc. Main form is a
drill down where user chooses appropriate site, once site
is chosen, filtered form opens assigning the number. I can
get the assign number form to open based on the SiteID
filter, but am unable to get it to automatically populate
SiteID and number prefix assigned to SiteID that would
automatically be combined with next consecutive number.
Once form opens it gets the next number, but the SiteID and
prefix are blank. Am needing them to default to the set
value for the SiteID chosen, then assign the number in
order for more data to be manually entered against it.
New number comes from below, field on form is set at
default to GetNextPackageNo().
Public Function GetNextPackageNo()
'gets next free Package Number
GetNextPackageNo = Nz(DMax("[PackageNo]", "[MasterDetail]")
+ 1, 1)
End Function
Would appreciate any help, thank you.