473,785 Members | 2,489 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Loading Access form with text box using autonumber

4 New Member
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 tblCorrectiveAc tion. The tblemployees has fields ENAME, UserID, and a few others. TblCorrectiveAc tion 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 2380
NeoPa
32,578 Recognized Expert Moderator MVP
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,578 Recognized Expert Moderator MVP
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
2728
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 one table, 36 fields. The record_id field is an autonumber field (long int) and primary key. The rest of the fields comprise of 30 text fields, 3 memo fields, 1 date field and 1 currency field. Text fields vary in number of characters allowed. ...
9
3840
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 site for a small club I belong to and one of the features I would like to include is the ability to allow users to upload image files. unfortunately the servers web root www folder only allows READ and EXECUTE permissions, which makes it...
4
2616
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 date, time and duration. I would like a pop up box to appear when registering an appointment if the time / days clash with another appointment. Somehow I need to create a table or query that blocks out sections of
7
2991
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 Name Text Title Text Phone Text
4
2663
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 to table1, and multiple records in table 3 that tie to table2. Both on "1 to many" joins. Each of the forms are bound to the fields in the respective tables. The subform & subsubform are datasheet view. When I enter any data, I
1
1936
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 think straight. I am working on a database to help track projects. There are three different types of projects/screens that I need. What I have so far: TABLE: Taskers (Screen/form 1) FIELDS: RMTaskerID – Autonumber/Primary Key CGTaskerNmbr -...
1
3045
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 - userID (linked to ID.userID fname -- text lname -- text age -- number
6
11763
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 contents of the form is inserted into the MS Access database. The Customer table in the database already has 30 records (with CustomerIDs 1 - 30) in it (from when the database was first created). The CustomerID field in the database is an...
0
9647
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
9485
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
10356
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
10161
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
9958
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...
0
6743
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
5390
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4058
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
3662
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.