Auto Fill Entry If Condition Is True
Apr 19, 2005
I have a table
(Not real names)
AutonumberPK
RequestType (Lookup to TypeTable)
RequestNumber
RequestName
This table then Relates to a request detail table.
The question here,
There are two types or request (T1 and T2)
In my form to enter new Requests I will have a dropdown box to select the type of request.
The next field is the request number. If the type of request is T1 then the person entering the request will have a 6 digit number to enter. But if the request is T2 then I need to auto populate the field.
Is this possible?
Or should I just build two forms, one for each type.
Also what would be the best way to auto fill in a number that follow this pattern.
05040001
05 = year
04 = month
0001 = the number of the request for this month.
Every month starts over at 0001
View Replies
ADVERTISEMENT
Mar 9, 2006
First I would like to give thanks to all the knowledgeable folks here who have helped me with my DB to date. It is working and every one is very happy and I have learned a lot.
So now I would like to add some more functionality to this existing project.
My DB is for data input of customers for a drawing. It has the following fields: Id, account number, first name, last name, date/time, score1, score2.
I t is taking a great deal of time for the users to enter in hundreds of entries a day. Most of the entries are customers who are already in the DB. I would like to get the fields to auto fill the data for existing customers say after the account number is entered. So after you put in the account the name and any other pertinent data would shows up saving users from typing it in again.
The first problem I am having is that this is still a data entry form and I can’t figure out how to be able to see the account information and still add new data to the record? The new data is a daily score they get.
Second I haven’t figured out how to call up the customers information from just the account field.
I’ve googled this and haven’t found anything terribly helpful.
View 2 Replies
View Related
Mar 21, 2013
I've just returned to work after kids and started managing a large Access database related to health, back-tracking over many years.
Currently in filling a form we physically enter:
Apples 2.2
red apple 2.4
red apple cut 2.45
Oranges 5.6
Cucumbers 8.5
Is it possible to get field 2 to automatically fill with a number code due to the text typed in field 1?
FWIW, I'm confident at more basic Access e.g making follow on default value = Dlast("field""table") type stuff but the more complex stuff I haven't touched since Uni over a decade ago and you will need to be gentle while I blow away the cobwebs
View 3 Replies
View Related
Jun 15, 2006
I have a database with 3 tables. Each table has an account number field however the tables are completely different as are the account numbers that populate them. To go with the tables are queries that will bring in desired information. What i would like is for the user to input an account number on a form and have some code in the background that will find the account number in the table it is in and open the corresponding query. Is this possible? Thanks for the help. I have been trying to write code with DLookup but can't seem to get it to do what I want.
View 7 Replies
View Related
Oct 11, 2007
Hi
I wrote code that should validate a field when entering a new record and then if a condition is true, that new record should be cancelled and not entered into the table.
I managed to partially achieve this by writing the code below, but the new record does not get cancelled because the table will still create a PK for that record and leave the rest of the fields empty. I am using an autonumber for the PK that's why the table creates it automatically What I want to achieve is to cancel the creation of a new record at once, I don't want even PK created for that new record.
I used the CancelUpdate because I thought it would cancel the record creation, but it did not! When I read about it it said that I need to use it with either Edit or AddNew, (which i don't understand why!) but it still does not work.
Private Sub PlotNum_BeforeUpdate(Cancel As Integer)
On Error GoTo Err_msg
Dim db As DAO.Database, rs As DAO.Recordset
Dim n As Integer, i As Integer
Dim vPlotNum As Integer
Dim vPhaseID As Integer
vPhaseID = Forms![frmHouse].Form![PhaseID]
vPlotNum = Forms![frmHouse].[qryHouse2].Form![PlotNum]
Set db = CurrentDb
Set rs = db.OpenRecordset("tblHouse")
rs.MoveLast
n = rs.RecordCount
rs.MoveFirst
If n > 0 Then
For i = 1 To n
If rs![PhaseID] = vPhaseID Then
If rs![PlotNum] = vPlotNum Then
rs.Edit
rs.CancelUpdate
MsgBox "This plot number already exist in this particular phase." & vbCrLf & "Please choose a different Plot Number"
Forms![frmHouse].qryHouse2.Form![PlotNum].Text = ""
End If
End If
rs.MoveNext
Next i
End If
rs.Close
db.Close
Set db = Nothing
Set rs = Nothing
Exit_Err_msg:
Exit Sub
Err_msg:
MsgBox Err.Description
Resume Exit_Err_msg
End Sub
Any suggestions will be very much appreciated.
Thanks.
B
View 14 Replies
View Related
Feb 24, 2015
I'm trying to have a single or multiple query criteria based on what the user checks on a form.
I can't get the True condition to work at all, I get no records. Here is what I'm using
IIf([Forms]![FrmAttendanceLogsRpt]![BlkFilter]=-1,[TempVars]![EID] Or 86,[TempVars]![EID])
If I just put
[TempVars]![EID] Or 86
in the Criteria it works just fine.
View 14 Replies
View Related
May 28, 2013
I know you can use a "Conditional format" to change a color of a control in a report. What I am trying to do is change the whole line if a condition yields "True" of one control. I did it once before, but oops I didn't save my work. I am using the format [Entity]![IT]. Where "Entity" is either the department or vendor, and "IT" is for the IT department. I want the control "Name" to change color if "Entity" is true if "IT" is the data.
View 3 Replies
View Related
Jun 8, 2005
I've tried googling this, but I can't find anything helpful. I have five columns in my 'Main' table. In each row, column B, C & D are solely dependant on column A. And column E is completely independant of all of them. I want to be able to select a choice in column A using a drop-down menu (which I know how to do) and have columns B, C, & D automatically fill themselves in (which I don't know how to do). Column E I would just manually enter.
How do I get columns B, C, & D to automatically fill themselves in my 'Main' table. I would select a value from a drop-down menu in column A and want everything else to fill in. The values for A,B,C,& D are all in seperate tables with an ID and linked to their respective fields in the 'Main' table. Appreciate any help.
View 1 Replies
View Related
Aug 14, 2007
Hi
Does anyone know how I can auto fill all the records of a field by just entering it once
Thanks
View 2 Replies
View Related
Jan 17, 2008
I am looking to find the experssion that will allow me to put a date in a query under date completed and have it fill another field for schedule.
I know that in Excel it would be =sum(A1 +90 ) and this will give a date 90 days after the date inputed into field A1 and so on down the column. and it would auto fill the next column for me
View 2 Replies
View Related
Sep 27, 2005
In using a form to input new information, I want to utilize the autofill feature, but I don't know how.
For example. When someone inputs a month, I want the season to be automatically entered in, in the following entry.
Can someone please give me some direction or help me to do this!?
:D Thanks!
View 1 Replies
View Related
Dec 12, 2007
I have an access database with information that is posted to through a form. On the form I have a dropdown box with a list. After choosing an options I want a text box to auto fill from data in a separate table in the same access file. I have been trying different things for about a week, and I have done alot of reading.
View 2 Replies
View Related
Jul 15, 2005
I have a subform and when the controls on it are updated, changed from previous info, then I need a control(called dtmUpdate) to show the current date (=Date()).
How would I go about doing this?
Thank you
View 5 Replies
View Related
Mar 31, 2006
I am trying to auto fill feilds when I select from a combo box. I have tried to use help, but I can't get it right.
View 1 Replies
View Related
Mar 7, 2006
hi. this might be simple for others but i'm new with access. how can i automatically fill a YES/NO field referring to a Text field. which means, if the field is EMPTY, it will automatically say "No or False" in the Yes/No field, or vice versa.
thank you people of great minds and kind heart. more power to you all.
View 6 Replies
View Related
Mar 9, 2006
Hi,
I am trying to write a database that has one table for companies and another for the services they hire.
The objective is to end up with a managable excel sheet that imoprt into an accountancy package. (Using Acess to eliminate several sheets in current procedure and also free up 1.5 days PCM data entry time).
I have set an auto look up that will autofill the required fields into the form ( =MYQUERY.column(1) ). This works fine and does what i need it to. My problem is that it does not write back to the table so I can not run an outputto command.
I do not know of any other way to produce the autofill to try another way. I have looked at the setup and can not find any problems.
Does anyone have any ideas to help me out?
craig@lenihan.me.uk
Thanks
Craig
View 1 Replies
View Related
Mar 28, 2005
Alright, I've tried just about everything else, now I need to tap into the grapevine for some help. I've read every thread about auto pop info, DLookUP and auto fill. I'm so lost and confused. I'm an Access 97 beginner and can't seem to get my form to do the things I need. I'm working with an existing form and trying to get text fields to auto fill with an "After Update" command. I'm not familiar with VB coding and the function isn't working. If someone out there can help me, I'd really appreciate it.
View 12 Replies
View Related
Mar 28, 2005
Alright, I've tried just about everything else, now I need to tap into the grapevine for some help. I've read every thread about auto pop info, DLookUP and auto fill. I'm so lost and confused. I'm an Access 97 beginner and can't seem to get my form to do the things I need. I'm working with an existing form and trying to get text fields to auto fill with an "After Update" command. I'm not familiar with VB coding and the function isn't working. If someone out there can help me, I'd really appreciate it.
View 3 Replies
View Related
Apr 24, 2005
I am a new access user and need some help. I have created an auto fill query to fill in information on a sales order table from my customer table based on CustomerID.
I have also created a sales order form. When I enter the customer ID in the form the rest of the data does not fill in. Actually nothing happens.
How do I link the form to the query so that the form knows where or how to look for the auto fill customer data.
Thanks
Darrell R
View 1 Replies
View Related
Aug 9, 2005
Here is what I have so far. Table 1 has employee info. Table 2 is for the courses that employees take. Table 3 is a listing of available training courses. What I have done is created a form with all the employee info and linked it to table 2 by ss #'s. What I am wondering is if I can create a field, lets say course #, in table 2 and table 3. That way when I input the course number into the subform, then the corresponding info from table 3 is inserted, ie course name and course hours. Any suggestions or help would be great.
View 1 Replies
View Related
Oct 25, 2004
I have a database with a table of all our records. I created a form, and would like to be able to type in the last name in the last field and have it bring up the record. Also, this could be a problem because there are several people with the same last name. How do I do this? Thanks!
View 1 Replies
View Related
May 1, 2006
I am desperate for some help. I have 2 forms.
1. School
2. Venue
I am entering school names into the school field in the school form. I want that information to automatically appear in the school field in the venue form. I know nothing about VB. Can anyone help me?
For a temporary solution I put a refresh button on the school form so after the information is entered into the school field you have to hit refresh and then that adds the data to the school combo box in the venue form.
Martha
View 2 Replies
View Related
Aug 7, 2006
can I have fields in a form auto filled from fields in another table?
View 1 Replies
View Related
Mar 21, 2007
Hello,
First post!
I'm looking for help with auto-fill (more specifically, I believe I need to use the "After Update" function.
What I have is an order form where I will be putting customer orders. I have a form and a subform, and the line items for the actual order go in the subform. Therefore the subform has a combo box for "products" which references the "products" table by fetching "productname" through "productID"
What I need to happen is when I select a specific product in that combo box (which works), I would like the "price" to be auto-filled into the "Price" box I have to the right of "product" and "quantity"
However I can't figure this out for the life of me, and I've searched places and tried different things, but I always end up with it not working. I can do this in Visual Studio with a DDL and a Label and a small function, but Access is way different from what I can tell with my little knowledge.
Any help would be appreciated!!
Thanks!
View 2 Replies
View Related
Mar 23, 2013
How to auto fill value from table3 to table1 and 2 ? for exmple, ShareID and Contract#, move from table3 to table1 and 2.
Table1
ShareID
ShareName
Table2
ShareID
Contract#
Table3
Date
2/2/2013
Contract#
123
ShareID
AAPL
ShareName
Apple
Cost
Quantity
View 3 Replies
View Related
Aug 23, 2006
Hi
In my database i have a field called product code which the user enters the code as T0001, T0002, T0003 and so on for each record.
would it be possible when adding a new record for that field to auto fill the product code as T0004 for example, so the user doesnt have to type the code in all the time.
please help, ty
View 1 Replies
View Related