473,769 Members | 3,108 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Novice looking for help - Automatically generate a purchase order number

51 New Member
Novice looking for some direction!!

I am trying to have a text box autopopulate with a number added to it at the end and I am having a difficult time doing this.

Example:
(1) I have a combo box [cbojobid]

I would like to have a purchase order number automatically generated from that number to another text box

What I would like to have have happen is when I click on the combo box [cbojobid] and choose the selection from the combo box to have the new text box automatically generate a purchase number with the JobID plus (-08)

It would look like this:
4567-08

First four letters being the JobId and the (-08) being the last two numbers in the year.

Can anyone help please.
Thanks for your time.
Gary
Nov 14 '08 #1
6 2654
missinglinq
3,532 Recognized Expert Specialist
This should do the job:

Expand|Select|Wrap|Line Numbers
  1. Private Sub cboJobID_AfterUpdate()
  2.  Me.AnotherTextBox = Me.cboJobID & "-" & Format(Date, "yy")
  3. End Sub
Linq ;0)>
Nov 14 '08 #2
GLEberts
51 New Member
Worked like a charm.
Thanks for your help!

Gary
Nov 14 '08 #3
missinglinq
3,532 Recognized Expert Specialist
Glad we could help!

Linq ;0)>
Nov 14 '08 #4
GLEberts
51 New Member
Second Question -
The suggestion you gave me work great.
What would be helpful also is to have the job name automatically populate onto the form also into another text box [txtjobname]

What I have is when I click on the combobox [cbojobid] I have four headings to view simply for reference purposes to select the correct project.

First - JobId
Second - Completename
Third - Date
Fourth - Jobamount

I have worked for hours on this with no success.
Any suggestions would be appreciated.
Thanks
Gary
Nov 15 '08 #5
missinglinq
3,532 Recognized Expert Specialist
Is the second field, CompleteName, the value you want to populate txtJobName? If so:

Expand|Select|Wrap|Line Numbers
  1. Private Sub cboJobID_AfterUpdate()
  2.   Me.AnotherTextBox = Me.cboJobID & "-" & Format(Date, "yy")
  3.   Me.txtJobName = Me.cboJobID.Column(1)
  4. End Sub
once again with actual textbox name in place of

AnotherTextBox.

If CompleteName is not the same as Job Name, where is the data for Job Name stored?

Linq ;0)>
Nov 15 '08 #6
GLEberts
51 New Member
unbelivable - I tried this one so many different ways and completly blew off the (column1) - now that i see it - it makes so much sense.
thanks for your help again.
Gary
Nov 16 '08 #7

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

Similar topics

3
3271
by: laurie | last post by:
Hi all, I'm trying to help out a friend who has inherited a client with a PHP shopping cart application. Neither of us know PHP, but I've been muddling my way through, trying to get these old scripts working on a new server with the most recent version of PHP. I've pretty much taken care of all the various errors that were popping up. Most only pointed out out non-fatal undefined or assumed variables. I've been able to cure most of...
8
5481
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- Hello, I have a very simple problem but cannot seem to figure it out. I have a very simple php script that sends a test email to myself. When I debug it in PHP designer, it works with no problems, I get the test email. If
6
2148
by: John Baker | last post by:
Hi: As those who have looked at this newsgroup recently will realize, I am a neophyte with Access, although I have experienced with Approach (the Lotus product). There are things I could easily do in Approach that appear to require some subtle and complex manipulation in Access. Herein lies my present problem. I have a number of tables, including one called "tblPO", which contains purchase orders. Some of the details of these change...
15
2667
by: Colin | last post by:
I have a query that calculates the selling price of products on customer orders. Selling prices are calculated based on the average cost of the items when purchased. As I make new purchases, the product cost changes (as it should) to reflect the new average cost. However, the problem is that the selling price of previously sold items also change when new purchases are made. Keep in mind that I'm not storing any calculated values anywhere....
4
1658
by: trond | last post by:
Hello all, Before I start I'd like to point out that I am a complete novice when it comes to asp.net - My background is in network and operating systems, and although I have been doing a bit of hobby programming in vb.net and web programming in asp/vbscript in the past, I am pretty much a beginner at asp.net. What I'm trying to do, is to take the "PersonalHomePage" starter kit that MS supplies with VS2005 and tweak it a bit, to make it...
12
1952
by: Jim Anderson | last post by:
This is my first attempt at XML documentation. I'm trying to get started with docbook so I can put a set of documentation into docbook tags. I'm using 'XML In A Nutshell" and "DocBook The Definitive Guide", both of which are a bit outdated already. I have a simple file that parses, but when I read it into Netscape or Konqueror, I do not get the results that I would hope for.
3
2202
by: Wired Hosting News | last post by:
Lets say I have 10 products in 10 different stores and every week I get a report from each store telling me how many items they have left for each of the 10 products. So each week I enter in 100 records with a store number, item number, on hand qty, and date of report into my sales data table. My tables primary is a combo of store# & Item number & Date After 10 week of this I have 1000 record total with ten unique dates.
1
1816
by: bb72 | last post by:
Hello, I have a project using JSP and JSTL. I have to forward one JSP to another. The problem that I am having is understanding what JSTL tags to loop through and get the information from the java class by using the <c:when>, <c:choose> tags. I have index.jsp, plants.jsp and a Customers.java file. The customer has to what type of plant they want, enter a quanity, and put in their id number. I have 2 errorr messages, one if that they need...
4
2019
by: Constantine AI | last post by:
I am working on an automatic Purchase Order Generator where with a click of a button will automatically assign a PONo to certain stock items (based on the SuppNo). The coding i have at present is as follows: Dim db As Database Dim rst As Recordset Dim rst2 As Recordset Dim rst3 As Recordset Dim IntPONo As Integer Dim strSQL As String Dim PO As String
0
9589
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
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
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
10045
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9863
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7409
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
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3959
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
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.