473,386 Members | 1,823 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,386 software developers and data experts.

Auto Number with my SQL

I have just moved over to mysql as the back end and keeping access as
front end. My database is for a ordering system. I use autonumber as
the Order Number. as mysql does not display the order number
(autonumber) until the form has been saved.

Is there a way on the order form that i can have a button that will
save the data then reopen the form so the order number ( autonumber is
displayed)

I am currently only learning about access so some nice easy instruction
would be very helpful
Thanks

Simon

Nov 7 '06 #1
2 7324
>I have just moved over to mysql as the back end and keeping access as
>front end. My database is for a ordering system. I use autonumber as
the Order Number. as mysql does not display the order number
(autonumber) until the form has been saved.
MySQL is a database. It doesn't do forms (although there are lots
of things that will do forms and interface to MySQL). And if you
don't try to do a query until the form is filled in and submitted,
MySQL doesn't get involved at all.
>Is there a way on the order form that i can have a button that will
save the data then reopen the form so the order number ( autonumber is
displayed)
In MySQL you can have a field in a table like:

id int not null auto_increment,

If you insert null into that field (either by leaving it out of the
field list on an insert, or explicitly inserting null into it),
MySQL will put in the next number in the sequence.

Nov 8 '06 #2
S.*******@shos.co.uk wrote:
I have just moved over to mysql as the back end and keeping access as
front end. My database is for a ordering system. I use autonumber as
the Order Number. as mysql does not display the order number
(autonumber) until the form has been saved.

Is there a way on the order form that i can have a button that will
save the data then reopen the form so the order number ( autonumber is
displayed)

I am currently only learning about access so some nice easy instruction
would be very helpful
Thanks

Simon
I think you can use a stored procedure to accomplish this. have the sp
insert an order record in your database table and return the id to the
user. then use the id to display it (or whatever else). finally save all
the data after the user inputs all the other fields.

hope this helps.
Nov 8 '06 #3

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

Similar topics

1
by: Ken | last post by:
Need help on the Auto Number or Identity Seed on the Oracle Database I got an Access database that need to be converted to Oracle 9i. Somehow the Trigger we created to simulate the "AUTO NUMBER"...
2
by: Irwinsp | last post by:
Hi All, I have a form with an auto number field displayed. The field looks great except when the user is entering a new record. The field then has the text "auto number" in it. Is there a...
2
by: Tom | last post by:
I am trying to store information into a table that has an auto increment field. There is currently no data in the table. Using the code below I cannot insert data into the table. I get an error...
5
by: Geoff Cayzer | last post by:
At http://www.blueclaw-db.com/tips_tricks.htm I came across a section which is included below and was hoping for some comment on the article. -------------- Almost never use this auto-number...
16
by: John Baker | last post by:
Hi: I know this is a strange question, but I have inherited a system where files are copied and records re auto numbered (as an index field) )frequently, and I am wondering how high the number...
2
by: Mike N. | last post by:
Hello- I have a database that uses an auto number field type that goes out of sync periodically. My customer gets a "cannot add record, number already in use" error message. I dump the records...
4
by: Shahar | last post by:
Hi I need to get a field name 'ID'(that is an auto-number field) right after I add a new row to table, it's work like that: myCommand.ExecuteNonQuery(); myCommand.CommandText = "SELECT...
13
by: S.Dickson | last post by:
I had an access database that i use as an ordering system. I have a form for entering customer details. When i add a new customer on the form the customer number is an auto number that appears when...
2
by: bubblegirl | last post by:
Hi, I need help in getting this database to work well (user-friendly) by generating auto client ID. The ID is NOT the auto number that Access automatically create when there is no primary key. ...
5
by: David Wright | last post by:
Hello Everyone I would be grateful if someone could help me with the automatic increment of a field on my subform called ‘Test_SrNo’. I am Using Microsoft Office 2000. The auto entry of the...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...
0
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...

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.