Forms :: Blank Form And Unbound Combo Box

Oct 26, 2013

I have a form that I would like to have blank fields when it is opened. I put the following in the "On Open" Event field of the form properties:

Private Sub Form_Open(Cancel As Integer)
DoCmd.GoToRecord , , acNewRec
End Sub

However, it does not work. I have an unbound combo box on the form for users to select from, in which all the records on the form will populate with whatever is selected in the unbound combo box. I thought this was the problem at first, but even if I remove that from the form, the form still opens to the first record. If I set the "Data Entry" field to "Yes" on the Data tab, that works, but then none of the fields populate when using the combo box.

View Replies


ADVERTISEMENT

Forms :: Search Unbound Column In Form Combo Box

Jun 16, 2014

I have added a combobox to one of the forms in my customer database using the "find a record in my form based on a value in my combobox" section of the combobox wizard.I have a number of columns in the combobox (the primary key is the bound value, and I have unbound columns for first name, surname etc).

I sorted the records in the combobox by column 3 (surname) so I can scroll through the list and choose surname instead of having to memorise customer numbers. Now I have more than 1500 records (with more on the way), scrolling through takes ages, and I was wondering if there is a way to adapt the combobox so I can (for example) type the first letter of a surname into the box and be taken to surnames beginning with that letter, whilst retaining the primary key as my bound column?

My initial thought was to base the combobox values on a query, and make the query prompt for a starting letter (or string of letters) each time it runs, so it only displays the query results in the list, but I was wondering if there is a neater way to do it?

View 2 Replies View Related

Forms :: How To Load Blank Form Before Combo Box Selection

Feb 14, 2014

I have a form that I populate after making selections in two combo boxes but when I load the form the text boxes are already filled in with the first record. The combo boxes load blank, which is what I want.

How do I get the rest of the form to be blank on load? It is made up of text boxes and check boxes that are all bound. Will this only work if they are unbound?

View 7 Replies View Related

Modules & VBA :: Getting Blank Lines In Table Even Though Form Is Unbound

Jun 24, 2013

I have created a forum that all fields are unbound. On completing it is written to the table using a RunSQL command. This writes to the table with no problem but when it does so it is creating another entry with zero content. This is the save steps with open new form

Code:
Private Sub SaveRecordAddNew_Click()
Call PreSaveCheck
If Me.saveCheck = False Then
Exit Sub
Else
Call WriteToTable

[Code] .....

View 12 Replies View Related

Modules & VBA :: Unbound Subform Has No (null) Records - Form Stays Blank

Aug 4, 2015

The unbound Parent form has a listbox (SQL Server) , the selection updates the SubForm with a primary key ID. The Subform is a ReadOnly view from an Oracle Linked table. It populates with a Select * From Oracleview where ID = listboxID The code is at the link shown below update: The subform uses textboxes linked to the read-only record.

The main form can populate, no problem. However the SubForm data source is either populated OR is Null.

If it is Null, the subform stays blank. Two Objectives:

1. Set a boolean variable flag in the parent (main form) that subform record exist or that it is null. e.g. Parent obtain recordset count property from Sub form
2. Display the subform with blanks.

[URL]

View 3 Replies View Related

Forms :: Way To Continue To Blank Form After Entering Information Into Previous Blank Form?

Mar 25, 2013

When entering information into a blank form, I would like to be able to continue entering information to another additional blank form after my last entry. Is there a way to continue to a blank form after entering information into the previous blank form? I would just like to continue without having to close the entire form and then reopening another form.

View 7 Replies View Related

Forms :: Force Value In Unbound Combo Box?

Mar 26, 2013

Ive got a database with a combo box, called "combo1" (with 2 columns). It is unbound but uses a query as its row source. When i select a value in combo1 is places the data from combo1.column(1) into a textbox (text1). I then click the next record button (button1) and it then keeps the same value in combo1 because it is unbound. So i need it that when i go to the next record it displays the value in combo1 that relates to text1.

View 2 Replies View Related

Forms :: Using Unbound Combo Box To Pre-populate Field

Sep 17, 2013

I am using an unbound combo box to pre populate my field

Example: on my form if I select a post code prefix AB1 it is returning a value 2AB the second half field of the form.

The form works for me however it does not return any value for the second half on my table.

View 1 Replies View Related

Forms :: Combo Box With Blank Entry

Aug 7, 2013

I have created a form that searches through one of my tables, via a query, it then automatically creates a report from that query.

I want to add an option into the combo box's that is blank.

Currently if you wanted to choose by 'fault category' but accidently click on 'failure analysis', it will take the top value of the combo as the entry, you can't then blank 'failure analysis'.

Each combo box gets its information from an independent table.

The only think I figured out what adding the refresh button which just closes then reopens the form so all the fields go blank.

View 14 Replies View Related

Unbound Combo Box Search On Form

Sep 15, 2004

It wont populate the pertinent fields.. where have I gone wrong. DB attached.

View 8 Replies View Related

Forms :: Unbound Combo Box Populate Fields Linked Tables

Jul 18, 2014

I have form with an unbound combo box which is populated from a query

It should populate a field in a table which is related to another - however it only works when i query by id number (primary key) and not the text value i want - is it possible to query both so it returns say 1,option 1 - then when selected it will place a 1 in the table - which is related to option 1 in another table instead of just having to select '1' which will mean nothing to a user?

View 5 Replies View Related

Forms :: Change Combo Box To Text Box - Show Unbound Column Value

May 28, 2013

How to change a combo box to a text box control in a subform for a field that is based on a two-column value list. I want to be able show the value in the unbound column (which is a text value instead of a number).

My subform has a field called "ProjectStatus". This field is a value list in my projects table with the following row source:

1;"Built";2;"Unbuilt";3;"Active";4;"On Hold";5;"Completed (Master Plan)";0

So, it is set as a two-column value list with a number data type for the bound column. In my forms, column 1 is made invisible (set to 0") so that only the text value is shown to the user. This works fine with combo boxes.

However, I want to change the unsightly combo box to a text box and show the text value of the unbound column (this form will only be used to show data not for entry). When I change it to a text box control, the value that appears is a number, of course.

If ProjectStatus were based on a table, rather than a lookup value list, I would query it but I am not sure how it should be done with a value list. I could just store the text value instead, I guess, and redo a bunch of stuff or I could create a "Status" table and redo a bunch of stuff (this seems like my lot in life lately) but I feel like there should be some way to do this.

View 6 Replies View Related

Forms :: Unbound Combo Box - Lookup List Of Numbers Through Query

Oct 2, 2013

I have an unbound combo box that looks up a list of numbers through a query but on the drop down list it does not go all the way down to the bottom of the numbers. For instance the combo box will only go down to the number 27453 but I know there are more numbers than that in the table. I can even type in a number and get the info but it still doesn't show up in the list...

View 1 Replies View Related

Unbound Combo Boxes And A Form With Allow Edit Set To 'NO'

Oct 29, 2005

Hi folks,

I have a form with a record source property set to a query which pulls the data by joining two tables. The form also has four navigation buttons (first, previous, next, last) and a ADD record, SAVE record, EDIT record, DELETE record buttons.

I also have a unbound combo box (control source iset to 'empty') in the form's header section and its record source property set to an SQL (SELECT DISTINCTROW tblProjts1.chrProjectName, tblProjts1.intProjectID FROM tblProjts1 ORDER BY tblProjts1.chrProjectName;). It's columns count is 2, bound column is set to 2 and column width is set to 3.1146";0".

In the edit button, I have the code "Me.AllowEdits = True" so that the user can edit the data.

Also, I have the following code on form's "on current" and "after update" events so that it will flip back to allow edit to 'NO'
Me.AllowEdits = False

Also, I have the following code on the combo box's 'after update' event.
Dim strSearch As String

strSearch = "[intProjectID] = " & Me![cboProjectID]

'Find the record that matches the control
Me.Requery
Me.RecordsetClone.FindFirst strSearch
Me.Bookmark = Me.RecordsetClone.Bookmark.

My Problem:

When I run the form and select a record from a combo box it populates the fields (all memo data type) in the form with correct linked record, ONLY when my allow edit property is set to 'YES'.

With allow edit set to 'NO', then when a tried to make a selection from a combo box it doesn't allow me to select any record. The combo box seems to be locked up and I can't select any record.

Does anyone come across such a problem with cbo box and 'allow edits' property in the forms.

Your help is much appreciated.

ShanVel

View 2 Replies View Related

Forms :: Reset Combo Box To Blank Or Non Selectable Value In List

May 29, 2014

On my unbound form I have a combo box with a record source type set to value list and the record source with two choices in it. I would like the combo box to reset back to either blank or a the phrase "select one" once a record is saved. If it shows "select one" I do not want the user to be able to actually select that. As I said the form is an unbound form and I have used the coding of "insert into" to save the new record to a table. I have been able to clear the text box on this form when the new record is save by resetting it's value to "" but have been unable to reset the combo box to blank.

how do I reset the combo box through code after a save to display nothing - or is there a way to add a non-selectable choice to the list and have it display when the form is refreshed.

View 4 Replies View Related

Combo Box Blank When No Records On Form

Dec 30, 2005

Hello,

I have an unbound combo box in the header of a continuous form. The box is set to value list, and when you select a value, the recordsource of the form is changed. This works fine.

However, if I there are no records in the underlying form, the combo box is blank. If I check the value in the immediate window or the after update, I can see that it is set properly and contains a value, it just doesn't display it. I am using Access 2000. I have tested on Access 2003 and cannot replicate the problem.

I have found one post here (http://www.access-programmers.co.uk/forums/showthread.php?t=84423&highlight=combo+box+blank) on the topic.

I found this (http://support.microsoft.com/default.aspx?scid=kb;en-us;287478) article on Microsoft which has my symptoms, but I am not opening a recordset.

Anyone know how to fix this??

View 5 Replies View Related

Blank Combo Boxes Used For Form Selection

May 23, 2006

Hi All,

Am using a number of combo boxes as selection criteria for a report. The combo boxes are linked to a table, obviously there will be times when no criteria is required and will want to select "ALL" when left blank.

Is there a simple solution ?

Cheers

View 2 Replies View Related

Combo Box Filter In Subform Showing Blank At Form Opening

Feb 26, 2015

In the Purchase Order details form a Supplier has to be chosen via a combo box. Based on that another combo box in the subform displays products only from this supplier (Products table is linked to supplier table).

I managed to let the subform combo show only relevant products using criteria referring to the main form combo box. Also other product data will show accordingly in text boxes. So far so good.

However when I close the form and reopen it the subform combo box is blank, other text boxes still show the right values. If I remove the filter criteria for the subform combo then all fields show all data correctly. (However the combo box is unfiltered again 8-/)

So somehow the 'criteria' prevents the combo to show the value that was previously chosen.

View 2 Replies View Related

Forms :: Getting Value From Unbound Textbox Into Form

Jun 20, 2013

I have a unbound text box in the form header and have a command button in form I am wanting to put the unbound textbox value into a bound textbox on form.

View 1 Replies View Related

Forms :: Open Blank Form Based On Value In Text Field In Main Form

Jun 6, 2013

I have one table containing name of restaurant with its address etc. Then i created another table to list out the restaurant workers names and details. Just as an example,

Table:Restaurant
Restaurant name
Address line 1
Address line 2
Restaurant #
Website

Table:StaffContact
Staff Role
Name
speciality
email
phone

I have the main form that has all the restaurant details only. And i have another form containing the Staff information. Please note the two table have a relation and it works well.

Now to make it user friendly(basically easier for the lazy ones), I dragged the staff contact form on to my main form and displayed it as a datasheet(basically a sub form).

Now, my boss does not want users to add/delete on this sub form(datasheet). So,he wants me to create buttons to open new record of staff for each restaurant(new form)

My issue is with opening a new record to enter a new person to the staff list and give them a role as well in form view.The new form has

So i ran a Macro, with open form with Where condition

Code:
[Staffcontact]![Rest Name]=[Forms]![MainForm]![RestaurantName]

But, it does not work .

View 2 Replies View Related

Forms :: Replace A Form In Unbound Field

May 13, 2015

I have a form with a navigational control which loads in the unbound area a form according to the navigational btn, this form has a list of records in datasheet view, when clicking on a specific records it opens a form with the specific record selected, I would, once double clicked on the record, the form to open within the same unbound window.

To be more precise, from the attachment, when the frmMain is open and the user double clicks on the IATACode the navigation target under the Tab Airport closes the form "frmQueryAirport" and opens "frmAirport", once the user closes the window with the appropriate Exit Btn, the "frmQueryAirport" reopens.

View 5 Replies View Related

Forms :: Create A Table From Unbound Form

Feb 2, 2014

May not be using the correct terminology here. I have a form that currently does not have a RecordSource. From this form, I want to create a table called "ICEA" with the following fields (which would be entered from the form): OperatingDay, Hour_Ending, Import, Export, and Net.Can this be done with a SELECT statement or does it have to be done through VBA?

View 4 Replies View Related

Forms :: Sum Unbound Field In Continuous Form?

Dec 17, 2014

I have a continuous form with a number of unbound fields and bound fields. However, I would like to sum an unbound fields (Text28). Text28 is an unbound calculated field based on another calculated unbound field (Text22). I would like to sum Text28 in the footer or somewhere in the form.

Here are the codes for my field:

Code:
Text28 = iff([Text22>0], [Text22], [Text20] --- This works
Text29 =sum(iff([Text22>0], [Text22], [Text20]) --- this is not working

and it did not work.

View 3 Replies View Related

Forms :: Unbound Form With Bound Listbox

Jun 2, 2015

My code is not working.

1. The code below should equal the Current Month
2. It does not close the form if no data.

PHP Code:
If DLookup("[CurMonth]", "tblEmpEvaluation") = Format(DateSerial(Year(Date), Month(Date), Day(Date)), "mmmm ")
  DoCmd.OpenForm "frmEvalNotice"
End If 

PHP Code:
If DLookup("[CurMonth]", "tblEmpEvaluation") <> Format(DateSerial(Year(Date), Month(Date), Day(Date)), "mmmm ") Then 'No Data. NotWorking?
    DoCmd.Close acForm, "frmEvalNotice"
End If 

View 7 Replies View Related

Forms :: Using Unbound Field On The Form To Be Parameter

Apr 3, 2013

I have set up a Parameter query which works, and use this on a form.

What I am having a problem with is using an unbound field on the form to be the parameter.

For example in the Empty feild/box on the form I would type SMITH, and this on a click of a button next to it would run the parameter query as a subform.

View 1 Replies View Related

Forms :: Update Table From Unbound Form?

Sep 23, 2014

I have a form, which has a search box. This allows you to search through the id numbers of each record. Once an ID has been selected a bound textbox displays the id number. Other unbound textboxes then display other information from the table with the relevant record.

What I want to do is then allow users to change information in textboxes and update the record.

View 7 Replies View Related







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