Auto Insert Value To Field When Form Opens
Sep 28, 2006how can i insert 'thisvalue' into 'thisfield' as soon as the form is opened??
View Replieshow can i insert 'thisvalue' into 'thisfield' as soon as the form is opened??
View RepliesSomeone once posted an database on how to do this but I was not able to see how they were able to automatically input the data into a text field.
I know how to do a combo box to query and input those results into a combo box but I am confused how they got the information from the combo box selection to automatically put the other variables into the testbox. They did this without using the dlookup command. In fact it was done without any code.
They showed how to do this automatically without code and with two other methods (one being dlookup). Can someone please help me if it is clearcut as I don't have too much time to search the forums for empty answers (believe me I have already wasted too much time) Thank You
On my form have a status field with about 7 options to choose from a combo box, i have these values set in another table. What i would like is for my other field, which is a date, to automatically change whenever the status field is changed. So i know how long ago the status field was set. So basically if i change the status to complete i want the date to then set the date and time now.
View 5 Replies View RelatedHow can I get a form to open when the database opens?
View 5 Replies View RelatedSo I ave a tab Control with 5 tabs. When I hover or move across each tab name it auto opens that page, so I don't have to click to open. How do I get the VBA for this?
View 1 Replies View RelatedHi all!
I was wondering if you guys can help me out with this one:
I would like to have data auto-inserted from a particular colum in table 'x' in to a defined column in table 'y'. similary, I'd like to achieve auto-updation of this data as well as deletion. Can anyone please provide some guidelines?
A little more detail :
I have a column "Client ID" in the table client_personal_info, the rows of which I'd like to have updated in the "Client ID" column in the client_business_detail table.
So if say, ClientID_1 is a row that has been added by the user, I'd like to have it auto-inserted in the client ID column in the client_business_detail table
thanks in advance for your help
Hi,
I've been given an existing database to modify, and I'm struggling somewhat to see how the author has implemented certain functions.
On a main menu form (autoexecs on starting the database), there are various "Search By" option buttons to generate a report, ordered in various ways. The "On Click" field for each of them refers to a macro, called Buttons, and a line in that macro dependant on the type of search (e.g. OnClick = Buttons.byPerson).
The Buttons macro runs an OpenReport command, the report corresponding to the search type (e.g. Buttons.byPerson has an OpenReport command for the "Report by Person" report).
However, when I click the search buttons (or indeed run the corresponding reports) I instead get another form which allows the search criteria to be specified - this then generates the report (I would assume based on the relevant query - e.g. Person Query), but I cannot understand how this works.
Google searches have not helped much as I can't seem to find an adequate search phrase to use, and I've been staring at the thing for some hours now. Any help getting me off in the right direction would be much appreciated!
I have written a form from a table which holds employees details. This table has a photo field. The form has a control which displays the employee’s photo. It uses the field, photo as the control source.
This works okay but if you wish to enter a photo from the form you have to click on insert. Browse for the file etc.
The Sample database “Northwind” on the access help has a similar form, but under the photograph there are command buttons to add/change or remove the photo which is obviously a much more professional way of doing it.
I have looked at the properties of these control buttons and they seem to work through a visual basic program. As someone who has a very limited knowledge of VB is there a simpler way of doing this or would I be able to cut and paste the code to work on my form somehow (If Legal)
Any advice would be greatly appreciated.
I want wage rate should be inserted automatically instead of manually in attendance sheet. In labourwage form, wage rate will be fixed for labour type with wagedate as and when required. Once I add attendate in attendform, it should look-up the table labourwage and auto insert wage rate entry in to wagerate column for the respective month ie from the given wage date up to next given wage date of labourwage. I have tried much, but not succeeded and presently entering manually which is time wasting. This should be possible with writing some code with VB.
View 14 Replies View RelatedHi all,
I have a table which contains business details (name, address etc) and also a field for clients. I then have a table which contains client details. Is there anyway I can click a button on a form containing business details which brings up a form containing the clients which would allow me to click the clients I want to be inserted onto the clients field on the business details table?
Does anybody have an example of this.
Thanks for your help!
This is really hard to explain, but basically I'm trying to use a combo box that has a control source different than it's record source to update another field on the record source. For example, the combo box pulls it's options from a table called "NameList" and when you select an option from the combo box it updates a table called "Results". On this form there are form fields that are bound to the "Results" table. What I want to happen is, when I make a certain selection from the combo box, I want one of the fields bound to "Results" to automatically display text from a different table. Is this even possible? If this is a horrible explanation, please let me know. I need serious help on this one, I've been working on this for a day and a half now. If anyone has any ideas on how to do it a different way, please make suggestions. Thanks in advance!
- Josh :confused:
Also, another thing I forgot to mention, this may help anyone who tries to help me. This "Results" form is basically used as a log utilizing a report to display a sequence of events. I've included a screenshot for visual affect. I have censored a few things for privacy reasons.
i have a form, which is based on query from multiple tables.. in this form i want to add a unbound textbox in the detail section.. whenever a user leaves this records, the system should insert a record in another table with values from this record including this field... how to do this?
the record is from a query where as the field is unbound, still we need to insert the values from record and this field at the same time into another table..
example: i have item master and item production table.... from joining these table i get a query which will give me item A and prod qty .. when i use this query as form datasource, the detail section has these two fields.. now i want to have an unbound field budget.. so i have the followig in detail sectin
item A production qty budget qty
when users enter values in budgetqty field and moves to next recod,, the system should insert into another table xyz values (itemA, production qty, budget Qty)
how to do this..which event will be good.
urgent reply is expected.
Hello,
I have a access table with a OLE Object field that is storing a small signature .bmp image. I have a form that loads that image into a bound object frame. I made a command button that lets you choose a new .bmp image and it then loads the new image into the bound object frame. I am them doing update query on a save button that then save the new image into the table. The form works great. You can pick any .bmp and it shows up good in the bound object frame. When I click the save button and it runs the update query it run it 8 of 10 times fine. Problem is when it does run it the images gets inserted into the table and its destorted. Like its all static or have of the image turns black. Sometime when I run the same update query with out any code changes I get a access error that shuts down access or it inserts the image into the table and when you click on the cell to view it, it says the OLE data is not valid.
So Im not sure if the method Im using is ok or if there is a better way. I do need to store these images in the table tho. Below is the code im using.
code that loads new image picked into bound object frame
Code: Dim MyFolder As String Dim MyExt As String Dim MyPath As String Dim MyFile As String Dim strCriteria As String MyPath = vrtSelectedItem'vrtSelectedItem is the path to the image from the file picker Me.OLE_Sig.Enabled = True Me.OLE_Sig.Locked = False OLEPath = MyPath Me.OLE_Sig.OLETypeAllowed = acOLEEmbedded Me.OLE_Sig.SourceDoc = OLEPath Me.OLE_Sig.Action = acOLECreateEmbed Me.button_load_sig.SetFocus Me.OLE_Sig.Enabled = False Me.OLE_Sig.Locked = True
Then I run this for the save command
Code:DoCmd.SetWarnings FalseDoCmd.OpenQuery "qry_user_edit_update"DoCmd.SetWarnings True
This is the query to save the image.
Code:UPDATE tbl_Users SET tbl_Users.Signer_Sig = [forms]![frm_admin_users_edit]![OLE_Sig]WHERE (((tbl_Users.User_ID)=[forms]![frm_admin_users_edit]![field_userid_info]));
Any help would be great.... Been trying everything and no luck.
when I am exporting in fixed width format (.txt file), is it possible to automatically include in the outputted text file:
a header of the current date and time, and
a footer that will say how many records are in a certain table?
edit: when i say header and footer, I mean the first and last entries in the text file
thanks
Venom
Is it possible to look up 2 field to auto fill another field on my form?
Field 1 is "RiskLetter" this is autofill with "Risk" is user input.
I need to lookup RiskLetter and Risk and autofill from "Number" field. This to stop incorrect data being inputted.
So I need to look at the "Risk" & "RiskLetter" to come up with a "Number"
Would it be possible to use a Dlookup to look at RiskLetter and Risk to give me the score.
Hi All
I am new to this, hope you can help!!
I have 2 tables,
Customers and Routes
I want to auto insert data from Routes when I select the route Number from Customers,
the tables to auto update are
CruiseNumber:
CruiseName:
CruiseDate:
from
RouteNumber:
RouteName:
RouteDate:
I have read HELP in Access but I am a layman when it comes jargon. 'from the many to the few'??
Hope you can help....in 'Plain English'
I've got one form that a user will start on, titled "Query Form" - Only one text box is here and it is titled "text0"
Upon hitting enter here, a new form is opened up titled "Time_IN_Form".
What I would like to do is have the value from text0 on the Query Form to automatically populate Emp_ID on Time_IN_Form so the user doesn't have to enter their employee number twice (only once via the first form).
What is the best way to do this? I have tried playing with global variables but didnt have any luck with that.
I have a form with fields "Assigned To" and "Assigned Date". When "Assigned To" receives a value, i.e. Not=Null, I want to auto-populate the "Assigned Date" field with the current date and time. How can I do this? Any help is appreciated.
View 4 Replies View RelatedBasically, we have different camera modules on which we perform a given test a number of times, giving rise to 2 tables, tblCamera which will store basic info about the module and tblTest which will hold info for each test perfomed.
The camera module has a unique ID (CameraID, the Primary key in tblCamera and foreign key in tblTest (one to many)). The primary key in tblTest will be a compound key of CameraID and an incremental number for each test performed on a given camera (TestNo). The data for the tests will need to be entered through a form, so I can build a form based on tblCamera with a subform based on tblTest (which would be in datasheet view)... What I am looking for is a way to increment TestNo in the subform, starting at 1. I have tried using
=Nz(DMax("TestNo","tblTest","CameraID = '" & [Forms]![frmCamera]![txtCameraID] & "'"),0) + 1
in the Default Value box for this field, which works to a point but has the curious effect of adding each number twice (as the default value for a new record seems to be added as soon as you start typing in the current 'last row')
I just can't seem to get my head around this one, any suggestions would be much appreciated...
Thanks,
Bogzla
Hi, just a quick question that i hopes not too hard.
Basically i want one of the fields on my form to get automiatically filled in. I'd like it to take the first letter from one field and the first letter from another field. What im trying to do is make a primary key field up from other fields they have entered.
So for adding new customer i want it to take the firstletter of the firstname and first let of the surname.
SO for myself Luke Tarrant it would be LT. Then i suppose i'll need to add some unique so there no duplicates as it a primary key field im trying to populate.
So for instance Luke Tarrant would = L + T +001
Then Lucy Tarrant would = L + T + 002
Any help wouild be brill!
I am trying to autofill a field based on another field but am not sure the best way to accompish this. I have a database that includes an employee table which has an Employee ID Number (EIN), name, address, etc. All my employees are listed in that table (full time as well as temps).
I also have an attendance table, which i have created a form to input the information. When a full time employee is off, they are covered by a temp. So, the form includes a field for the guard who is off, how many shifts they are off and which temp employee worked for the full time employee and for how many shifts. My payroll department needs the employee ID added to each employee (full time and temp) on the payroll report.
My Report is formated by Guard Off with a start date and end date to coincide with our pay periods. Multiple people enter info and then a bi-weekly report is sent to payroll. The report lists the employee off and then sorts by date and lists the employee working that date and shifts worked. (I hope that makes sense)
All the employee information is in one table. What I would like is when a name is selected on the form for Employee Off from a list box the EIN is automatically added to the EmployeeEIN field in the attendance table(the name in the list box is pulled from the Employee table). I also need the same for the Temp employee. When a name is selected from a list box for the temporary employee the TempEIN is automatically selected from the same Employee table based on the name selected.I can go into relationships and link the name in the Employee table with one name in the Attendance table, but not both.
Just wondering if this can be done: You enter data in the first text box of a field on a continuous form, and all the remaining records are filled up with the same data.
View 2 Replies View RelatedI would like my form to open and automatically go to the end of the records, so I don't have to navigate to the end before I start entering data.
I have seen a form do this but can't find out how.
Thanks
I have two forms (made from two tables)
The tables are tblplans and tblplancontrol. tblplancontrol is the many end and
the foreign key is 'PlanID'
The first form that you open is the plans form. Here you complete data about the plan, i.e planID (which is unique as its the name of the plan), author and date. From here you then open the plancontrol form which is a continous form. You can select which people you want to recieve a copy of the form - the link back is the plan id.
What i want to do is make sure that each time you start a new record that the planid is automatically populated from the still open plans form.
I assume this is done through code but cant quite get the right one. It must be done before i finish each record otherwsie i will get an error.
Any help is much appreciated.
Thanks
Kevin
I actually have two questions.
1. I was reviewing the Access 10 commandments and I wonder why using "lookup" is evil?
2. I am working on a db which contains approximately 14 tables. One is tblMaterialslist which contains the following fields:
ID - Autonumber
PartDescription - ShortText
PartCost - Currency
Size - ShortText
Additionally, I have a form in which I would like the "PartCost" field to auto populate when the "PartDescription" field is entered.
I have 2 tables named Candidates & Comments. CandidateID is the Primary key for Candidates and CommentID is the primary key for Comments.
I have CandidateID as a foreign key in the Comments table to link the two together.
I have a form "frm_CandidateMain" which lists a candidates details and a subform within it "frm_Comments" (in datasheet view) which lists comments that have been made for that candidate. These forms are linked by CandidateID as the Master/Child fields. This is working fine, and when double clicking the comment field, another form opens "frm_expanded" which is a pop up and has a larger field to that detailed comments can be written/read without the need to scroll along in datasheet view.
However, when double clicking on a blank line in the "frm_comments" field the "frm_expanded" form opens a blank form with no CandidateID selected, but I'd like it to auto populate the CandidateID from the main form that is currently open.
I've tried to do with with a Macro within Macro builder, but failed to do this.