Setting A Combo Box Value From Another Form

Feb 18, 2005

I have a form with a query based bound combo. The same combo can be found on another form which can be launched from the original form. I want to update the combo on the original form with the same value as the combo on the launched form (after update).

In my after update event I have the following code;

[Foms]![form1]![Combo1] = Combo 2

This doesn't seem to work (I don't get an error but Combo1 doesn't update).

Any ideas?

View Replies


ADVERTISEMENT

Setting A Combo To The Record Selected In A Form

Feb 8, 2005

Hello,

I suspect this is probably rather easy, but I've not been able to figure it out:

I am using a combo to select a record in a form. This works.

The problem is: When I navigate through the records in the form, the combo box does not "update". I need to be able to change the record displayed in the combo box as the record in the form changes.

Any ideas?

Many thanks in advance for assistance.

View 8 Replies View Related

Forms :: Setting Up A Combo Box To Filter Another Combo Box

Jan 27, 2015

I'm having a little difficulty setting up a combo box to filter another combo box. I've actually got one working but the second one is giving me all sorts of errors. On the attached database, there's a form called frmAddNewRecord. At the top of the form there's a combo box which allows you to select a name and another combo box beside it which acts as a filter so only names from a certain section are shown (working fine).

The subform which is attached to this form and contains the training details, has another combo box which allows you to select a job...I've tried to add a combo box beside this to filter it but I can't get it to work.

View 5 Replies View Related

Setting Combo Box Default Selected Value

Aug 21, 2006

i have a combo box on my form that uses UNION query to put "<select>" as part of the list items.right now "<select>" appears on top of the list but what i mtrying to do is when the form loads i want the combo box to have "<select>" selected and not just show blank unless someone click on the down arrow. i m sure there is a way/propoerty to do it but i cant figure it out. Also how can i make my combo box so user cant type in a combo box but select from the list.

View 2 Replies View Related

Forms :: Setting Combo Box Field

Nov 18, 2014

How do I go about getting data from a:

Text field in Form 1

Clicking a button to run VBA code, and Automatically inserting it into a refreshed combo box in Form 2

I've also attached a pic.

*Also, I'm using Access 2007...

View 5 Replies View Related

Popup Box - Setting Up A Combo Box To Update A Variable

Oct 7, 2005

hello,
newbie needs help!!!
I have a globally defined variable (gsUser) which I defined in a module.
The idea is that when one of my users creates a record then , I will update a column called "Created by" with the current users value.

The issue is how to get the current user name.

In my main form , in the "beforeinsert" and "beforeupdate" events I have triggered a call to a function in my module (function WhoAreYou)

This function checks the value is gsUser and if blank it then does a DoCmd.OpenForms to my popup form.

The popup form needs to contain a combo box whoses recordsource is pointing at a table of users I have created BUT whose source control is not pointing to a table of any kind.

How can i set up this combo box so that a user can be selected, but the selected user then populates a variable instead of a data column??

I would then user the variable to populate gsUser.

if you could give me an example I would be gratefull


Alternatively if you can think of another way of making the user pick his name from a list of usesr before updating data I would be glad to here it

Thanks in advance for your help
MartyK

View 12 Replies View Related

Forms :: Setting Text Box Value According To Chosen Combo Box Value

Feb 7, 2015

I have a form that adds a record to a table in the database.I want that when i choose a value from a combobox in the form, it will change the value of another textbox according to what value was choosed.So essentially what i did is simply go to the combobox AfterUpdate and there i used this code:

If Me.Combobox.Text = "Solid" Then
Me.TextBox1.Text = "grams"
ElseIf Me.Combobox.Text = "Liquid" Then
Me.TextBox1.Text = "ml"
End If

But i encounter 2 problems:

1. When i set a default value to the textbox (which i want to), the changing of the value in the combobox doesn't do anything whatsoever.
2. When i remove any default value from the textbox, the changing of the value in the combobox does change the textbox to the corresponding value but then gives run-time error 2185: "You can't reference a property or method for a control unless the control has the focus".

View 2 Replies View Related

Forms :: Setting Control Source To Combo Box

Jun 12, 2014

I have a combo box control in my form named PayDateID, but I told that control to DISPLAY the associated field PayDate.

I now am trying to make a separate control in the same form whose control source is the DISPLAYED PayDate, but it only wants to reference the underlying PayDateID.

How can I make the control source be the displayed value in that combo box?

View 1 Replies View Related

Setting Default Values In Combo Box To Match The Value Of Previous Record

Dec 21, 2005

G'day. I've been browsing the forum trying to find a solution to a problem, without much luck, and am hoping that someone might be kind enough to help me more directly.

I'm a biologist and a newbie to access: with the distinction of being completely clueless about VBA. Nonetheless, I have been tasked with creating a database for storing data obtained from biological surveys of juvenile salmon and harvest/spawner surveys of adult salmon.

The bones of the db are in place and functional. The problem I have is streamlining the data entry process to minimise keystrokes/mouse clicks.

I have a subform for entering fish records with attributes such as 'species_name', 'fork_length', 'count', 'presence of tags, etc. The idea is that fish can be entered as individuals (count=1) or groups (count>1) with attribute data at the appropriate level (eg, fork lengths only entered for individuals. We typically measure the fork lengths of the first 20 individuals of each species and then tally the remainder).

One problem I face is that fish often occur in schools, and it becomes quite tiresome to click and select the same species_name combo box value for each record when entering multiple individuals of fish of the same species.

What I would like to do is set the default value for that combo box (on the fish subform) to match the value entered for the previous record.

I suspect that you could use the after update trigger to execute some code to change the default value each time something is entered manually into the combo box. Unfortunately, I know nothing about how to write the appropriate code.

Can anyone offer me some guidance?

Thanks in anticipation.
Sincerely,
Craig Dolphin

View 11 Replies View Related

Queries :: Setting Criteria For Query Based On 3 Combo Boxes

Jul 10, 2013

Ok so im working in MS Access 2007.

I want to create a query based on 3 combo boxes but have it so that if the field in the second or third combo box is not populated the query still runs.

Right now i have the Criteria set for the three columns that i wish to sort by as seen below.

Column 1
Criteria: [Forms]![Entity Selection Form]![areabox2]

Column 2
Criteria: [Forms]![Entity Selection Form]![devbox2]

Column 3
Criteria: [Forms]![Entity Selection Form]![entitybox2]

This gives me the correct query result but im forced to make a selection from each combo box. Is there a way to progamme it so that if I only make a selection from the first combobox and leave the others blank i can still get results in a query?

View 2 Replies View Related

Forms :: Setting Focus To Control On Single Form Side Of Split Form

Jun 24, 2013

When I right click a row on the data sheet side of a split form an select "New Record" I want the curser to go to the first field on the single record side. I've placed this in the OnCurrent but it did no good.

Code:

If Me.NewRecord Then
Me!Descrfiption.SetFocus.
End If

Any way to set the focus to the single form Side of a split form?

View 4 Replies View Related

Setting Query Criteria To Be 'blank' Depending On The Criteria Of A Combo Box

Oct 21, 2006

I have set up a database that stores actions (i.e jobs). In the table; two of the fields are...'required completion date' and 'actual completion date'. I wish to lookup, by using a query, all of the open actions (those which havent yet been complete (i.e the 'actual completion date' is null)) and then later on all those which are overdue (i.e the 'actual completion date' is null And the 'required completion date' <today....this being the criteria for an overdue action).

However, I have used a form which has a combo box which contains the values open and overdue. When a selection has been made I want a form to display with the results depending on the selection that has been made. I am capable of creating a form based on a query, but am unsure of how to construct the query with the correct criteria based on the option that is selected from the form.

Any help would gratefully be appreciated. Thanks

View 5 Replies View Related

Forms :: Setting Form Properties From Another Form Gives Nothing?

Aug 23, 2013

So I have two forms: Af and Bf

In Af, when a button, Abtn, clicked, it'll run

Code:
Me.Visible = False
DoCmd.OpenForm "Bf", , , , acFormEdit
Forms![Bf].Form!Blabel.Caption = Me.Atxtbox
Forms![Bf].Form!Bcombox = Me.Atxtbox

Then Af lost from view and Bf appears in form view, with Blabel and Bcombox show the value of Atxtbox.

BUT if I try something like this in Bf when an event happens

Code:
Me.Bcombox2.RowSource = "SELECT xx FROM tablexx WHERE yy = '" & Nz(Me.Bcombox) & "'"

Nothing will be shown in Bcombox2, because Me.Bcombox return Null. I know this from doing

Code:
MsgBox Me.Bcombox

and the message box will shows nothing. The same thing also happen with the Blabel's caption. In form view, it shows Atxtbox value, but when I accessed its caption's value, it returns Null.

What I wanna do is:

1) Open Af, insert value to Atxtbox

2) clicked Abtn, pass the value of Atxtbox to Bcombox

3) Af is closed, and Bf is opened

Why the null...?

View 5 Replies View Related

Setting Up A Pop Up Calendar In A Form

Apr 18, 2006

I need to include a pop up calendar in a form - could someone please point me in the right direction about how I go about doing this?

Also, I'd like the day to be selected and shown automatically when a date is selected - does anyone have any idea how I could do this please?

Any help would be much appreciated.

Thanks in advance

View 5 Replies View Related

Setting Up Form To Allow Decimals

Mar 23, 2006

I need to have a field on my form to accept the user keying in the number in this fashion: 200200.1234 but as I currently have it set it accepts only the 200200 portion of this part number. I am a beginner so I am sure this is an easy question for some of the pros out there.

As a footnote the table design has the bin no. as data type - text and I added an input mask of 000000.0000;0; the field on the form is a combo box. Maybe that will make a clear picture for you.

Thanks in advance for your assistance.

View 5 Replies View Related

Setting Form Properties...

Jul 6, 2006

I have a form that is intended to be used for both data entry and to edit/delete records.

The form properties are set to:
AllowFilters = YES
AllowEdits = YES
AllowAdditions = YES
AllowDeletions = NO
DataEntry = YES

When a user opens the form from a menu they are given the choice for NEW, EDIT or DELETE.

If the user chooses NEW, the properties remain as above

If the user chooses EDIT or DELETE the form should open to a specific record as chosen on an interim form.

I have been using the following code to open the form for EDIT:
stLinkCriteria = "[fldID] = " & Forms!frmsearchresults.fldID
DoCmd.OpenForm "frmJobInfo", acNormal, , stLinkCriteria, , acFormEdit

However, the form continues to open in Data Entry mode.

I have a public variable that is set to NEW, EDIT or DELETE that can be used to trigger code...

Where should the form properties be set to make sure that the form opens correctly?

Any help would be appreciated.

Thanks!

View 1 Replies View Related

Setting Default Value Within Form

Jul 25, 2006

Hi, im new to the forums - this is my first post.

On a form i have a text box which holds the date that a file batch was taken to be processed. Each file holds the date of when the batch it originated from was taken. At the moment for ease of use the 'Default Value' of the text box is set to the batch's date.

I want to set it up so i can change the default value of the cell, so that when a new batch is to be processed the new date becomes the default value.

I am invisaging a button which brings up another form with a text box into which the new date can be put. when the form is saved and closed, the date recieved cell on the master form assumes the new default value.

gawd... methinks that was an awful explanation.

please help!

View 3 Replies View Related

Setting Form Sizes

Nov 17, 2004

Hi,
I am a new member, who has been reading these postings for several weeks, hoping for a few quick answers, but no luck.

I have several issues on form size.

The first is that some of my forms open OK, but they change the form size of the form that opened them. My main form is maximized. When I open a child form, not maximized, the main form, and the open Access windows, such as the DataBase form and any open Tables, Queries, Reports, etc all become non-maximized.

The main form has the dimensions of the last-opened form .mde files, which leads me to believe that there is some Access option that crosses project or database lines. I cannot find it.

If I maximize the main form with the child form open, Access maximizes the child form also. If any form is open in Design View, the Properties window may be on top of everything. As the controls I need are seldom visible in these small windows, I spend much effort resizing windows.

What do I need to do to have a maximized "Switchboard" and smaller child windows/Forms???

View 2 Replies View Related

Setting Query Value From Form

Nov 11, 2013

I am trying to access the same query/report from different forms. For example I have a StudentAttendanceForm where users select a StudentID and then open the report. The query criteria for ID# is [Forms]!

[StudentAttendanceForm]![StudentID].

Can I access this same report from an event on another form. I'm thinking that if I can some how assign the StudentID from the form I want to access the report from, to the criteria on the StudentAttendanceReport Query, this is possible.

I am new to code but I am thinking something like:

SET [StudentAttendanceQuery]![StudentID] TO [StudentEnrollmentForm]![StudentID]
Open StudentAttendance Report

The StudentEnrollmentForm is the other form I want to access the report from

You may need a crystal ball for this one. Let me know what other info you need.

In general I am finding I am copying and tweaking queries to meet specific user needs. For example some want to access a single student and other need "batch" reports.

View 1 Replies View Related

Setting The Right Shape Of A Form?

Sep 25, 2015

When I am working on the Lesson 37 shown here:[URL]

I get to the point

Click the label that was added to the subform and press Delete (to remove the label). You may also need to move the subform and resize the tab sheet.

Now I assume the label to be removed is the original title of the subform or sbfVideos. That is the label that must be removed. It also says "You may also need to move the subform and resize the tab sheet." I will say that you do. My tab sheet is about 2 3/8 inches in width. I want to move it so the width increase to 3.25 as shown in the figure in the tutorial right after it says that you need to resize tab sheet.

When I grab the far right orange line and pull to the right the whole subform moves! That is not what I want.I merely want to increase the width of the form as I said above.Also in this narrow initial file when I switch to form, it cuts off parts, usually the Length. Of course, that is not what I want.

View 5 Replies View Related

Opening A Form And Setting Values?

Sep 29, 2006

Okay. So, i have this frmProduction that has a cbo box on it, and when i select the value 'sold from field' i want it to open up another form (frmSales) that i have already created. Now, not only do i want it to open it but i want to have some information on frmSales filled out with the values the user entered on frmProduction. I already have it opening the frmSales on the AfterUpdate value on the cbo box (if statement) but i don't know what to do about setting the values of frmSales!

Any help would be much appreciated!

View 3 Replies View Related

Setting A Password Up Before Opening A Form

Feb 7, 2005

Hi and Thank in Advance

Is there a way to set up a password when opening a certain form by clicking a button? Thanks

View 1 Replies View Related

Setting On-screen Form Size

Jul 14, 2005

Could somebody please tell me how to set the size that my form will appear when loaded, because it's really annoying me trying to get them to appear at the size I want.

View 3 Replies View Related

Setting Function For F Keys In A Form

Sep 4, 2005

Where do I go to make the F keys perform a particular function when moving around in a form, like "go the the last page of the form" or move to the top, or to page two etc. Thanks.

View 2 Replies View Related

Problem Setting A Size Of The Form

Nov 23, 2005

Hi guys

In my database I have a main form and depending on the options chosen on this form other forms will pop up on the screen.

I want the main form to cover the whole page therefore in the On Open event I have used the Docmd.Maximize function. The problem is that after this point all the other forms will maximize once they are open! How can I stop the pop up forms from maximizing and make them open in a specific size? What code can I use for this?

Thanks

View 6 Replies View Related

Setting Focus On A Tabbed Form

Oct 12, 2006

What is the syntax for defining the tab that has focus when a tabbed form is opened under various situations?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved