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

Loading Access form with text box using autonumber

4
I'm modifying an Access 2000 database created by a co-worker who is no longer with the organization, and is trying to figure out one part of the program. The database has two tables, tblemployees and tblCorrectiveAction. The tblemployees has fields ENAME, UserID, and a few others. TblCorrectiveAction has an autonumber field named Corrective Action ID, Originator, OrigDept, DateofCA, and several other fields. Then there is a form that has text boxes bound to Corrective Action ID, Originator, OrigDept, and DateofCA. When the form opens, the program looks for the currentuser (logged-in to the computer) and matches the UserID to print the Originator. Then, it fills in the DateofCA and OrigDept. How does the program look at the autonumber field (Corrective Action ID) and fill in the highest number?

The person is using
Expand|Select|Wrap|Line Numbers
  1. Sub AssignName()
  2. If Not IsNull(DLookup("[ENAME]", "tblEmployees", "[UserID] = ... etc as part of initial lookup.
  3. Me!txtOriginator.Text = DLookup("[ENAME]", "tblEmployees", "[UserID] =
  4. more lines ....
  5. End If
  6. End Sub
Jan 13 '07 #1
2 2367
NeoPa
32,556 Expert Mod 16PB
Anekwe,
  1. Please remember to use code tags when posting a question (As per REPLY GUIDELINES at the right).
  2. Are you asking how generally to do it or are you asking someone to work out how your erstwhile colleague did it in his code?
Jan 13 '07 #2
NeoPa
32,556 Expert Mod 16PB
BTW - If it's the latter you're asking then all the (relevant) code would be needed. I had a look at what you posted and you've chopped out some of the important bits :(
Jan 13 '07 #3

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

Similar topics

0
by: Frances | last post by:
Hi All, I'm having a problem trying to add a record to a simple Access 2000 db (db is very similar to an address book but with more info than the usual address, phone, etc.). The database is...
9
by: Wayne Smith | last post by:
I've come up against a major headache that I can't seem to find a solution for but I'm sure there must be a workaround and I would really be grateful of any help. I'm currently building a web...
4
by: keri | last post by:
Hello again, While I try and solve the calender issue I also have another problem. I have a form & table (appointments) where the user records appointments in the future. The fields include...
7
by: jmar | last post by:
I'm hoping someone out there can give me a little guidance. I have an Access Database "Customer.MDB" with a table "CustInfo" that has the following design: Field: DataType CustID AutoNumber...
4
by: Don Do | last post by:
Help I built a form/subform/subsubform setup using the access forms wizard. I have a table1 = parent, table2 = child, table3 = (grandchild?). There will be multiple records in table2 that tie...
1
by: sjvandevoorde | last post by:
II am hoping someone out there will be able to give me some guidance, as I am about to give up. I have been working on this for some time and I think I have looked at it so much that I can't even...
1
by: BMF | last post by:
Howdy, I am mainly a MySQL user but I have been playing with Access 07 a little bit recently. I created a database with 3 tables. Table ID --- userID -- AutoNumber UserInfo -...
6
by: ashes | last post by:
Hi, I am creating an ecommerce website using Microsoft Visual Studio, VB.Net and MS Access 2003. I am new to VB.Net When someone wants to register on the website, they fill out a form and the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
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: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.