473,383 Members | 1,880 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

daily packing number - again

hi guys -the code (all capital letters) generates daily packing number,
it is in the on click event of a command button that moves to the next
record.

dpkn is unbound control - i use it to display the last daily packing
number genrated, so when the user moves to a new control they will know
what the last daily packing number was.

PdailyPackingNumber is bound and is 0 until the user clicks the button.

Private Sub CBfrmPackingSubPacked_Click()
On Error GoTo Err_CBfrmPackingSubPacked_Click

Dim x As Byte
X = NZ(DPKN, 0) + 1

If Nz(Plenght, 0) = 0 Or Nz(Pwidth, 0) = 0 Or Nz(Phight, 0) = 0 Or
Nz(Pweight, 0) = 0 Then
MsgBox "You Must Enter All Package Dimensions in Order to Continue",
vbOKOnly
Plenght.SetFocus
Else
Packed = True
PDAILYPACKINGNUMBER = x
DPKN = PDAILYPACKINGNUMBER
End If
DoCmd.GoToRecord , , acNext
PdailyPackingNumber.Requery

Exit_CBfrmPackingSubPacked_Click:
Exit Sub

Err_CBfrmPackingSubPacked_Click:
MsgBox Err.Description
Resume Exit_CBfrmPackingSubPacked_Click

End Sub

everything works great until i exit the form - when i come back dpkn is
0
i know why this is hapening - what would the best way to fix this?
and is there a better way of doing what i have done so far?

also, is there a way to open a form and automatically go to the record
that was active when i closed the form?

thank you all for all your help

Nov 13 '05 #1
1 1791
> everything works great until i exit the form - when i come back dpkn
is
0
i know why this is hapening - what would the best way to fix this?
and is there a better way of doing what i have done so far?

also, is there a way to open a form and automatically go to the record that was active when i closed the form?

thank you all for all your help


You have to write the last packing number somewhere and retrieve it or
read the last packing number from the current day from a table. Then
you can increment that. Use the old DMAX(Numberfield)+1 trick

Hmm... go to the record that was last active... that's harder. Write
it into the form's filter when you exit the form? Or write it to a
hidden table and read it when you reopen the form.

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Paddy McCarthy | last post by:
I sent the following this morning: -------- Original Message -------- Subject: Threats to the: Daily Python URL! Date: Mon, 19 Apr 2004 07:50:04 +0100 From: Donald 'Paddy' McCarthy...
5
by: Taylor Howell | last post by:
Hello all, I have a delima. I have 8 5bit numbers that I need to pack into one (or more) variables. They then must be written (exactly 40bits (5Bytes)) to a file and have the ability to be put...
1
by: poohnie08 | last post by:
i have a excel spreadsheet showing staff name, date,work hour, ot hour, slot1, slot2, slot3, slot4 and others). The "()" will keep repeating from day 1 until end of month. eg in excel spreadsheet,...
2
by: gbb0330 | last post by:
Hi all I need some advice. the daily packing number will be used to match a box with its label. the guys in the warehouse will get a list of items to pack. they will find the item - put it...
1
by: gbb0330 | last post by:
hi guys -the code (all capital letters) generates daily packing number, it is in the on click event of a command button that moves to the next record. dpkn is unbound control - i use it to...
18
by: Edward Diener | last post by:
Is the packing alignment of __nogc classes stored as part of the assembly ? I think it must as the compiler, when referencing the assembly, could not know how the original data is packed otherwise....
9
by: fraz | last post by:
Does anyone have code to solve a 3-d bin packing problem in php? I am trying to solve the issue of packing various sized rectangular shaped objects into boxes of three different sizes so as to use...
1
by: QbProg | last post by:
Hello, what I'm saying here is about VS 2005 WITHOUT service pack. I have two DLL projects, with EXACTLY the same project preferences and settings. Both have alignment set to "default", it...
4
by: James Arnold | last post by:
I have a number of different files which I would like to combine into one file, which can later be separated into the individual files again. In essence, a zip archive, only without the...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.