473,769 Members | 6,286 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Duplicate events on access form (access 2003)

38 New Member
I have a receipt form (with continuous sub-form) where I need to issue many receipts in 1 form (from 12 to 36).
I need to duplicate the details of each receipt (the only change every time is the date and the cheque number).
For the duplication i'm using :
Expand|Select|Wrap|Line Numbers
  1. Me.dup_field.DefaultValue = """" & Me.dup_field & """"
for the cheque number i'm using :
Expand|Select|Wrap|Line Numbers
  1. Me.CHECK_NO.DefaultValue = """" & Me.CHECK_NO + 1 & """"
My problem is the date : each cheque is for the following month - how do I use the dateadd function along with my code to aachieve what I need please?
Aug 29 '09
11 2149
eyalco
38 New Member
I appreciate your comments.
In light of that, can you write what's your take on the best solution now?
Thanks.
Aug 31 '09 #11
NeoPa
32,573 Recognized Expert Moderator MVP
I would need to understand exactly what the requirements are. Can you use a format like "d mmm yyyy"? That would be my recommendation if you could as it's pretty unambiguous.

When assigning the resultant, formatted string to the .Default property make sure to surround this, within the string, in hashes (#).

I hope this answers your question. It seems a bit like simple repetition of what's gone before, but if not then I'm not sure what you require.
Aug 31 '09 #12

Sign in to post your reply or Sign up for a free account.

Similar topics

9
3113
by: MLH | last post by:
If you have these lines in code on MyForm1... DoCmd OpenForm "MyForm2`" MsgBox "I opened MyForm2" Is it #ALWAYS# true that all form events on MyForm2 will occur before the MsgBox statement in MyForm1 is processed? Is there ever an exception that might create
3
28843
by: Nhmiller | last post by:
I searched here for an answer. I am entering records into a database, and it would save a lot of time if I could duplicate a record that is very similar to the new one I am about to enter, then make one or two changes to the new one. This is the problem I have with Access. Look at this answer! >Private Sub btnCopy_Click() >On Error GoTo handle_error > Set cnxn = CurrentProject.Connection > Set rs = New ADODB.Recordset
3
4178
by: deko | last post by:
I'm using Access 2003 on WinXP-SP2. I open mydb.mdb from Windows Explorer, or from a shortcut that points to the mdb. The problem is every time I open mydb.mdb, a duplicate is created - mydb1.mdb. And if I try opening mydb1, then mydb11.mdb is created. Anyone have any idea why this is happening? How I can stop this? Thanks in advance.
8
3949
by: Iona | last post by:
Hi Allan, I'm using a nifty piece of code you put on here some time back to do a duplicate entry check as below. I'm using to check for duplicate names. However I am getting an error message on this line: Set rs = db.OpenRecordset("SELECT ID FROM Contacts WHERE (" & sWhere & ");") Contacts being the main table. I am using access 2003 The error message states that there are; Too few parameters. Expected 1 I have no idea how to...
9
11232
by: Tom_F | last post by:
To comp.databases.ms-access -- I just discovered, to my more than mild dismay, that some tables in my Microsoft Access 2003 database have duplicate numbers in the "AutoNumber" field. (Field Size is set to "Long Integer", and New Values is set to "Increment".) I know that an old version of the Jet database engine can cause this problem, but my version of msjet40.dll is 4.0.8618.0, which is supposedly bug-free in this respect. I am...
12
2140
by: capdownlondon | last post by:
Working in Access 2003. I have managed to duplicate a record using a button on a form with code: Private Sub Command16_Click() On Error GoTo Err_Command16_Click DoCmd.DoMenuItem acFormBar, acEditMenu, 8, , acMenuVer70 DoCmd.DoMenuItem acFormBar, acEditMenu, 2, , acMenuVer70 DoCmd.DoMenuItem acFormBar, acEditMenu, 5, , acMenuVer70 'Paste Append
1
3154
by: bemadragon | last post by:
Hello, I have been struggling with this for a while. I am working on a rather simple database for calculation purposes in Access 2003. I have a table called Order that has a primary key field called OrderID. It is linked to a (sub)table called Parts (primary key: PartID: autonumber) and this one is linked to a (sub sub) table called SubParts (primary key: SubPartID: autonumber). The idea is that a Order can be filed for multiple parts and...
2
1871
by: fabiola1 | last post by:
I'm using Ms Access 2003. I have five tables called tblAllContract tblType tbInteranlContact tblSupplier tblManager The other four tables are linked to tblAllContracts with Id's.I have a bound form called frmViewContracts where i view all my contracts on the system.This form is from query called qryViewContracts.
5
1282
by: brucedodds | last post by:
I would like a particular action to fire every time there's a mouseover event for any button on my (Access 2003) form. Does anyone know how to do this without writing an OnMouseOver event procedure for every button?
0
9587
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10211
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8870
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7406
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6672
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3958
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 we have to send another system
2
3561
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.