473,503 Members | 5,004 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1798
> 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
1552
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
4107
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
3338
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
1917
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
308
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
2018
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
5839
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
1640
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
1315
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...
0
7188
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7258
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6970
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5558
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4663
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3156
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3146
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1489
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
366
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.