Combo Box and First Record

Hello, I based my combo box on a query that is sorted and my Table is 
updating but when I open my form, there is information in all the fileds 
except the field with my combo box. When I select an item from the combo box, 
everything fills in correctly but I want the form to be completely blank when 
it is open, open on a new record?
Thanks again
0
Utf
1/28/2010 9:12:01 PM
access 16762 articles. 3 followers. Follow

5 Replies
1104 Views

Similar Articles

[PageSpeed] 0

Set the Data Entry property of the form to Yes.

-- 
Lynn Trapp
MCP, MOS, MCAS


"Lovespar" wrote:

> Hello, I based my combo box on a query that is sorted and my Table is 
> updating but when I open my form, there is information in all the fileds 
> except the field with my combo box. When I select an item from the combo box, 
> everything fills in correctly but I want the form to be completely blank when 
> it is open, open on a new record?
> Thanks again
0
Utf
1/28/2010 9:15:01 PM
That cleared the form, but now the macro doesn't work
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Product_Unit_ID]= '" & Me![Combo198] & "'"

Me.Bookmark = rs.Bookmark THIS LINE IS HIGHLIGHTED IN YELLOW

Also what is the purpose or the record selection area on the bottom right 
hand sidde of the form. Can it be hidden? 

"Lynn Trapp" wrote:

> Set the Data Entry property of the form to Yes.
> 
> -- 
> Lynn Trapp
> MCP, MOS, MCAS
> 
> 
> "Lovespar" wrote:
> 
> > Hello, I based my combo box on a query that is sorted and my Table is 
> > updating but when I open my form, there is information in all the fileds 
> > except the field with my combo box. When I select an item from the combo box, 
> > everything fills in correctly but I want the form to be completely blank when 
> > it is open, open on a new record?
> > Thanks again
0
Utf
1/28/2010 9:50:01 PM
> That cleared the form, but now the macro doesn't work

Correct. You opened the form in AddNew mode, so there are zero records in 
the recordset initially. The VBA code that you showed is typical for the 
AfterUpdate event procedure, to assist the user in finding an *existing* 
record in the form's recordset. But, if you intentionally open the form in 
AddNew mode, guess what....your existing recordset has zero records 
(initially--as you add new records, it will include these, but as soon as you 
close and re-open the form, the recordset will be back to zero records 
initially).

So, what do you want? To open a form to a blank new record, or to open a 
form bound to a set of records via a query or table, with an unbound combo 
box to assist you in finding a record? Although you can have both on the same 
form, you would likely want some VBA code to hide the combo box if the form 
was opened in AddNew mode. I think doing that is beyond the scope of this 
question.


> Also what is the purpose or the record selection area on the bottom right 
> hand side of the form. Can it be hidden? 

Bottom right or bottom left? Yes, you can set the Visible property to No in 
design view. As an alternative, you can set this property to No if the form 
is opened in AddNew mode, but leave it visible if you are opening the form to 
several records.


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
__________________________________________

"Lovespar" wrote:

> That cleared the form, but now the macro doesn't work
> Dim rs As Object
> Set rs = Me.Recordset.Clone
> rs.FindFirst "[Product_Unit_ID]= '" & Me![Combo198] & "'"
> 
> Me.Bookmark = rs.Bookmark THIS LINE IS HIGHLIGHTED IN YELLOW
> 
> Also what is the purpose or the record selection area on the bottom right 
> hand side of the form. Can it be hidden? 
__________________________________________

"Lynn Trapp" wrote:

Set the Data Entry property of the form to Yes.

-- 
Lynn Trapp
MCP, MOS, MCAS

__________________________________________

"Lovespar" wrote:

Hello, I based my combo box on a query that is sorted and my Table is 
updating but when I open my form, there is information in all the fileds 
except the field with my combo box. When I select an item from the combo box, 
everything fills in correctly but I want the form to be completely blank when 
it is open, open on a new record?
Thanks again

0
Utf
1/29/2010 8:10:02 AM
Ok, New data is being uploaded via an excell spreadsheet so adding a new 
record is not important. But modifying existing records is very important  
and brings me back to my original question. 
there is information showing in the form when it is opened, but my combo box 
is blank. I would think that at least a record should show in the combo box 
that matched the other data?


"Tom Wickerath" wrote:

> > That cleared the form, but now the macro doesn't work
> 
> Correct. You opened the form in AddNew mode, so there are zero records in 
> the recordset initially. The VBA code that you showed is typical for the 
> AfterUpdate event procedure, to assist the user in finding an *existing* 
> record in the form's recordset. But, if you intentionally open the form in 
> AddNew mode, guess what....your existing recordset has zero records 
> (initially--as you add new records, it will include these, but as soon as you 
> close and re-open the form, the recordset will be back to zero records 
> initially).
> 
> So, what do you want? To open a form to a blank new record, or to open a 
> form bound to a set of records via a query or table, with an unbound combo 
> box to assist you in finding a record? Although you can have both on the same 
> form, you would likely want some VBA code to hide the combo box if the form 
> was opened in AddNew mode. I think doing that is beyond the scope of this 
> question.
> 
> 
> > Also what is the purpose or the record selection area on the bottom right 
> > hand side of the form. Can it be hidden? 
> 
> Bottom right or bottom left? Yes, you can set the Visible property to No in 
> design view. As an alternative, you can set this property to No if the form 
> is opened in AddNew mode, but leave it visible if you are opening the form to 
> several records.
> 
> 
> Tom Wickerath
> Microsoft Access MVP
> http://www.accessmvp.com/TWickerath/
> __________________________________________
> 
> "Lovespar" wrote:
> 
> > That cleared the form, but now the macro doesn't work
> > Dim rs As Object
> > Set rs = Me.Recordset.Clone
> > rs.FindFirst "[Product_Unit_ID]= '" & Me![Combo198] & "'"
> > 
> > Me.Bookmark = rs.Bookmark THIS LINE IS HIGHLIGHTED IN YELLOW
> > 
> > Also what is the purpose or the record selection area on the bottom right 
> > hand side of the form. Can it be hidden? 
> __________________________________________
> 
> "Lynn Trapp" wrote:
> 
> Set the Data Entry property of the form to Yes.
> 
> -- 
> Lynn Trapp
> MCP, MOS, MCAS
> 
> __________________________________________
> 
> "Lovespar" wrote:
> 
> Hello, I based my combo box on a query that is sorted and my Table is 
> updating but when I open my form, there is information in all the fileds 
> except the field with my combo box. When I select an item from the combo box, 
> everything fills in correctly but I want the form to be completely blank when 
> it is open, open on a new record?
> Thanks again
> 
0
Utf
1/29/2010 2:04:02 PM
> I would think that at least a record should show in the combo box 
> that matched the other data?

Not if it is an unbound (ie. no Control Source) combo box, unless you add 
code in the Form_Current event procedure, similar to step #17 in this article:

    Combo box to find a record
    http://www.access.qbuilt.com/html/find_a_record.html


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
__________________________________________

"Lovespar" wrote:

> Ok, New data is being uploaded via an excell spreadsheet so adding a new 
> record is not important. But modifying existing records is very important  
> and brings me back to my original question. 
> there is information showing in the form when it is opened, but my combo box 
> is blank. I would think that at least a record should show in the combo box 
> that matched the other data?
0
Utf
1/30/2010 8:15:01 AM
Reply:

Similar Artilces:

Outlook fails to ask user for exchange account on first use
Hi Office XP Pro has been set up to be installed by an administrator onto a local XP client from an admin installation point using a tranform which includes exchange account details so that when a user first runs Outlook/Office XP the Exchange account is automatically set up. The admin installation onto the PC appears to work OK but when a user runs Outlook from the start menu/ desktop icon Outlook does not set up Exchange account and Outlook defaults to the Administrator's Exchange settings. We lock down the desktop so the account cannot be set up by right-clicking the Outlook...

Query with common fields to all records
I have a query that is collecting information from three tables. One table has infromation about each student and another table is an incident table and these tables are linked together using a student id number. The third table is the school information that I want common to all fields in my query (this data is only entered once for each school when the data base is first opened) How do I link the school information data to every record in my query when there is no common linked field? You should add a field to the student table that can be used to link to the school table. Is...

MFG Stored Procedure After Importing Inventory Records
I was advised to run a stored procedure called MFGFIX90 after inventory records are imported. Can anyone tell me how to do this? Jerry, This action is typically done by an administrator. It analyzes your MFG data to point out data integrity issues that might arise when importing records from "outside" the application and notifies you of missing logical table relationships. Go Start, All Programs, Microsoft SQL Server, Query Analyzer. When prompted, enter ODBC connection credentials to your server. Then, in the toolbar choose the "company" database you want to quer...

How do I remove duplicate in a column but keep the record of the f
Hi, I am given a whole list of Customers from different Countries who stayed in my Hotel for different months in a financial year beginning with October. My goal is to get generate a Monthly report of Customers (according to their country)who stayed in my hotel, on the condition that Customer who stayed earlier in the previous months of the financial year do not contribute to the statistics in the subsequent months. A pivot table is probable, and I need to count the heads at the same time. For example, Given data: Month Country Customer Oct UK James Collin Ja...

Open a Combo box using the keyboard
I have a combo box on an input form which I would like to open and make the selection using the keyboard rather than turning to the mouse. This is probably some built in thing but I don't see it in Help. Thank you, ern. When the combo box has focus, F4 will drop the list down. You can move up and down through the list using the up and down arrows. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) "ernie" <ernie@unspam.co.uk> wrote in message news:u8sPD705HHA.1212@TK2MSFTNGP05.phx.gbl... >I have a combo box on an input form ...

Reverse DNS entries for MX records
Hi My problem is that my exchange server can not send mail to uol.com.br due to Reverse DNS entries. How to change the setting in my Exchange server or just talk to my DNS hosting company? Any suggestion to fix this problem? Thanks you generally need to talk to your ISP to fix your REV DNS issue. "Joe" <Joe@discussions.microsoft.com> wrote in message news:5DFF4821-7856-4EE2-A6BE-2F7DB7BF20D9@microsoft.com... > Hi > My problem is that my exchange server can not send mail to uol.com.br due > to > Reverse DNS entries. > How to change the setting in my Exchange ...

Using multi-select list box data in a Query
I have used the following multi-select List Box data to open a report with no problems. I am subswtituting report name with a Query name using my list box data as criteria for a Make Table Query. I get ERROR message (Wrong number of arguments or invalid property assignment) at point where it tries to run the Query. Maybe strDoc = "Query Name" is incorrect OR my DoCmd.OpenQuery is incorrect ????? Can anyone help me with the proper coding? Private Sub OK_Click() On Error GoTo OK_Click_Err Dim varItem As Variant Dim strWhere As String Dim strWhere1 As String D...

2003 office EULA Dialog box after accepting agreement contiues to.
2003 office EULA Dialog box after accepting agreement continues to appear after I start word, outlook,excel etc.. The product has been activated. Is this caused by windows 7? See the following http://support.microsoft.com/kb/884202 -- Peter Please Reply to Newsgroup for the benefit of others Requests for assistance by email can not and will not be acknowledged. "PRICJAMP" <PRICJAMP@discussions.microsoft.com> wrote in message news:DF70CB7A-357D-42B0-B6C4-06BD68C1235E@microsoft.com... > 2003 office EULA Dialog box after accepting agreement continues to ...

alphabetizing by first letter if list
Is there a way to cause an existing to be organized by the first letter of each line? If each line is a separate paragraph, select all the items and choose "Sort." In Word2007 it's on the Home tab. Before Word2007 it's under the Table menu (but the paragraphs don't have to be in a table). If you have a table, the select one of the columns and choose Sort, and all the rows are listed in the order of that column. On Jan 1, 11:05=A0am, jakson <jak...@discussions.microsoft.com> wrote: > Is there a way to =A0cause an existing to be organized by the...

Scroll to record in continuous subform
This code is running in the Form_Load event of my mainform. It should select the first subform record that is greater than or equal to today's date. The subform is read only and all controls are locked. lngCount gets set to 4 which is correct in my test example but the record does not scoll into view inside the subform. The subform contains five records and is large enough to view two at a time. This code is an adapted sample so I am wondering if I am missing something? Dim lngCount As Long Dim rs As DAO.Recordset Set rs = Me.frmReservationListDetail.Form.Records...

How do I export an excel file as fixed length records
I want to create a record within an export spreadsheet, export this to another file(not xls) and retain fixed length fields in the exported file. Does anybody know how this can be achieved? One way: http://www.mcgimpsey.com/excel/textfiles.html#fixedfield In article <BC3FFB85-75AF-4171-8807-A857FB04EA37@microsoft.com>, iainjh <iainjh@discussions.microsoft.com> wrote: > I want to create a record within an export spreadsheet, export this to > another file(not xls) and retain fixed length fields in the exported file. > Does anybody know how this can be achieved?...

SUM on 1 uniques record from primary table
I have 2 related tables which I have used in a query and then in my Total Income report. In the primary table I have the AmountPaid field which is the amount paid by a customer for an invoice. In my report I list all the invoice items and the AmountPaid is repeated for each record. As a result, if I SUM the AmountPaid I get a wrong result because the same value is added for each item in the invoice. How can I find the sum on the unique value of the Amount Paid if this value is in my primary table? Andreas Y. wrote: >I have 2 related tables which I have used in a query and then in ...

When added a record wil automatically can be chosed in other form
Hello, I have the member data which can be added in a form. This table has the child filed of Address ID in from the PK of Address table. When I add a member data and found in its combo there is no the address yet, at the same time I open the address form and I add the address, then go back to member data on address I have a problem that if the address data is current ..in the address form, I can not see it in the member update form, we should return to the previous record then we can see it in the member form. My question is how can we make it even though the record of add...

Auto-select combo box entry when only one row
I have 2 combo boxes the second is dependent on the first. When the first is clicked, I requery the second in the OnClick event. When the requeried combo box has only one row, I'd like this to be auto selected. How can I do this? Thanks. "mscertified" <rupert@tigerlily.com> wrote in message news:3AACB546-54A0-4BC2-8AFA-03AEB37F001E@microsoft.com... >I have 2 combo boxes the second is dependent on the first. When the first >is > clicked, I requery the second in the OnClick event. When the requeried > combo > box has only one row, I'd like this to be...

Slow check box
HI all, Have a prob. I have multiple check boxes on my sheet but, they tak approx 2 seconds to select when 'clicked'. I know it still runs but have others similar that run instantaneously. Any ideas???? Cheers!! -- gavme ----------------------------------------------------------------------- gavmer's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=666 View this thread: http://www.excelforum.com/showthread.php?threadid=32029 ...

Subject: RE: Check Box retaining values on Cloning v4
Does anybody know if this will be possible in future (mapping bit fields with display style is checkbox)? Regarding some Workflow field assignment problems: Assigning a field of display type "Checkbox" a value: Change style to a two options field on the form. Assign the value in the Workflow. Change style back to Checkbox type. Assigning a field a value which is disabled on the form: guess how... :-) "Beat Kammerlander" wrote: > Does anybody know if this will be possible in future (mapping bit fields with > display style is checkbox)? ...

Prblm w/ photos ninserted in MS Word text box
I'm running Word 2004 on a Mac G5 running OS 10.4. When inserting a photo in a text box in a Word doc, some of the Picture Effects are not active.I want to add a shadow around the edge. When I click on the picture, the Picture Formatting Pallette opens, but the Shadow effect, next to "Effects" in the second row down is not active. What's going on? Mike in Atlanta On 12/20/05 5:35 PM, in article 1135118110.792146.154940@z14g2000cwz.googlegroups.com, "Mike in ATL" <mike.ventura@comcast.net> wrote: > I'm running Word 2004 on a Mac G5 running OS 10.4....

how to increase mail box to receive large messages using outlook ?
I am having messages bounced saying mail box not large enough -- how do I fix this ?? Thanks Chris speak to your email admin - if they are messages you send, speak to the recipient so they can ask their admin. (but don;t hold your breath that you'll get it increased) -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide) Author, Google and Other Search Engines (Visual QuickStart Guide) Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: http://www.slipstick.com Jo...

CListView scrolls to first selected item.
Hello, I have a CListView control on a simple frame with multi-select turned on. When I select an item in the list, and then scroll down with the scroll bar so that the selection highlight scrolls out of my view, and then press the Shift key so that I may select multiple items, the view scrolls automatically upward to the first selected item. Consequently, I am forced to select smaller numbers of items. In fact, I tried this with other keys too, and they all produce the same behaviour, except for the SpaceBar. Is there a way to turn this automatic scrolling off? I am using: MS Visual Studio...

sum of check box
Hi, I made a report from a query. In my report I have multiple check box (yes/no). I would like to sum all the yes check box at the end of the report. I tried =Abs(Sum([name_of field])) as well as =Sum(IIf([name_of_field]=True,1,0)) and for both, I get the result on the report as ''yes''....???... Any suggestion? Thanking you in advance! Cheers, Ka Fix the format property of the sum control (xerox engineering?) Pieter "ka" <ka@discussions.microsoft.com> wrote in message news:C09F5EB4-C98C-452C-A1A7-E0AFE8099D72@microsoft.com... > Hi, > >...

Combo Box. Change row order?
I have a Combo box selecting products in a customer price-list. The columns displayed in this combo box are: 'ProdID', 'Unit', 'Description', with ProdID as the bound column. But I want the Combo to display in the order: 'Description', 'Unit', 'ProdID'. (With the ProdID as the bound column as before.) I need to use the 'Description' as an autolookup. For some reason I cannot make the Combo display the columns in this second arrangement. I have tried rearranging the columns in the underlying query which is: *** SELECT Produc...

Mail small popup box
I'm receiving mail on two computers from a remote server running Windows XP, MS Outlook, Internet Explorer 7 Windows Vista, Windows Mail, Internet Explorer 8 With XP the mail opens with MS Outlook but with Vista it opens in a small popup window which is difficult to read. Can Vista open the mail with Outlook. Thanks Bengy Sure. Install Outlook on the Vista computer, if you have a license. -- Windows 7 Ultimate http://get.live.com/wlmail/overview http://download.live.com/wlmail "Bengy" <Bengy@discussions.microsoft.com> wrote in message news:7D2F68...

Text box displaying columns from a combo box
I'm using text boxes to display the column data from a combo box. Trouble is when I move to another record or close the form and ome back in, those results are not displayed anymore and I have to reslect the values in the combo boxes to fill in the text boxes. Is there a way to lock the results to the text box for each record? TIA -- Don, Sydney Australia Don, I take it that you have a combo bound to a field in your table. When the combo is dropped down, you see several columns, but when it's not dropped down you can see only one. Therefore you have added some other text boxe...

Combo Box help please
I have a combo box with 4 fields which is using a query made from 2 related tables. Column 0 populates the primary table and I need column 1 to populate the secondary table once selected in the form. The details from each field are located on the form (hidden with a visible field which joins columns 2&3 into one field) Is there a way to do this? Really do not want to split this down if I can help it. If I do need to split it, is there a way to select column 0 and it make the 2nd combo box only show related entries e.g Current Combo - 0=Company Name, 1=ContactID, 2=F...

Form Dropdown Combo Box
My dropdown combo box currently displays one column. What I would lik to do is have the box dispay column A and B but only extract the I from B. How would I be able to do this -- Message posted from http://www.ExcelForum.com ...