473,656 Members | 2,777 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

open form and select item from list Automaticly

3 New Member
i have database contain main form and sub form so when i open main form i will select item [customer-name] automatically and go the coarser to the sub form to begin
Jan 21 '17 #1
4 1356
zmbd
5,501 Recognized Expert Moderator Expert
Your question isn't very clear:
Are you opening the parent-form to a default record/value and want the child-form control selected

OR

Are you selecting a record in the parent-form and want to then have the corresponding record in the child-form.

If you are not selecting a record in the parent-form, then how are you selecting the value for [customer-name]

In any case, to reference the control in the child-form and setfocus to it you have something like this:
Me!Subform1.for m!ControlName.s etfocus

> NOTE: [Subform1] is the name of the control that actually contains the form used for the child-form, typically this will default to the same name as the form you inserted. I tend to rename the subform control to prevent any circular references.

> If you are coding from within the child-form
Me.[ControlNameHere] will refer to the control on the child-form. In fact, the "Me" shortcut will always refer to that form's objects within VBA.

Parent.[ControlNameHere] will refer to the control on the parent form provided the child and parent are properly linked in the subform-container-control's properties.

You should bookmark the following if you are going to be working with controls on subforms:
http://access.mvps.org/access/forms/frm0031.htm

and

http://allenbrowne.com/casu-04.html

Finally names, I recommend using only alphanumeric and the underscore, although Access will allow spaces and other symbols, these can create issues down the road...
Problem names and reserved words in Access
Jan 21 '17 #2
hazemyounis
3 New Member
hello
after update subform1 [parcodenumber] i need select [customername] from parent form automatically such ass cash customer i don't select customername manually or by mouse becuse i need speed to done my work
i am so sorry about language i don't speak eng fluently
Jan 21 '17 #3
hazemyounis
3 New Member
[IMG]file:///C:/Users/xxxx/Desktop/Untitled.gif[/IMG]

file:///C:/Users/xxxx/Desktop/Untitled.gif
Jan 21 '17 #4
zmbd
5,501 Recognized Expert Moderator Expert
Hello hazemyounis,

+ We can work around most of the native>English issues and usually we're not too strict about grammar or spelling so long as the intent of the post can be determined. :)

+ If you link the parent and child forms either by Hand or by Wizard (the following link uses the wizard) then when you select the record in the parent form all of the related child records will be filtered to the child-form. If you create a new record in the child-form it will automatically enter the foreign-key value of the parent table into the child table for the new record.
Create a form that contains a subform (a one-to-many form) (MS Link)


+ So I'm still quite unsure of your question.

I see you tried to upload an image file or two.
If you would please follow these steps:
1) click on the [Advanced] button below the post reply
2) In the new page-form that opens scroll down until you see the [Manage Attachments] button and click on that.
3) In the new dialog that opens you can upload up to five files/images at one time, click on the [Browse...] button next to each "slot",
+ you can also type in a single URL - I don't usually use this...
+ Bellow these slots is a list of allowed file types and restrictions.
4) Once all of your files are listed, to the right hand side is an [Upload] button. Once uploaded of the dialog doesn't close, or if you change your mind, there is a [Close Window] button in the upper right hand side.
>> Notice there are two different Upload buttons, they may work differently, IDK, I've never used the URL upload :)

You should be returned to the advanced editor window where you can see your attached files. You can then use the hyperlinks to insert your images inline.

Perhaps when you have the images uploaded we can more clearly understand you question.
Jan 21 '17 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
5267
by: phpuser32423 | last post by:
Hi everyone Is it by any chance possible to use mysql and php to auto create the content for drop-down lists on forms by retrieving the values from a database? The reason i ask is that on a site i am making i am asking users to select from list (e.g. nationality) however i would like to avoid typing out every possible value of which there are about 40 (which change). I would much prefer to keep a seperate table in my database for the...
3
2325
by: cefrancke | last post by:
Is there a way to list (through VBA code) all the controls on an open form including subforms, tab controls and all other containers as well. My specific issue is to find all controls with a FontSize property and adjust it as needed. When I use "For each ctrl in Me.controls" I dont get the subform controls or other container controls. I'm using labels, combos, text, tabs, datasheet/form subforms, and
4
2992
by: sara | last post by:
I am learning with a simple application/form. I am ok - enter customer name, list box of customers, select a customer, see the items for that customer. The items form has customer ID and Name in the header; details on continuous form in detail. I want to press a button "Add Garment" and open the customer item form with the customer ID and Name from the view of the form, but open it as Data Entry so the user can add garments.
4
2356
by: VK | last post by:
I'm looking for autoexpand <select> list onfocus and collapse it back onselect/onblur (the list is select-one type) I know it is not possible directly, but I've seen here a hack by changing dynamically position static/absolute and sel.size - cannot google it out though. Also some GNU/copyleft widget would be equally great.
3
2124
by: Prashant Mahajan | last post by:
Hi All, I am facing a problem regarding accessing the item list of an XML node in IE. While using the following code: for(test in XMLNode) {} I received this XML Node from AJAX's responseXML. This fetches item list in Mozilla and Opera, however it creates errors in IE.
3
6424
by: Beholder | last post by:
I hope that someone can help me with the following: Short background explenation: I have a shrfepoint page (newform.aspx) in a item list. On this page is a lookup column that displays a lookup of all category items in previous items. In the code this results in a select/options list like this: <SELECT TABINDEX=1 NAME="urn:schemas-microsoft-com:office:office#CatLookup"><OPTION
5
13857
by: =?Utf-8?B?bWNhdWxpZmZl?= | last post by:
I have an old application ( pre-VB5) that I need to add a select/option list to. This is an edit program so the values for the form will be retrieved from a database. How do I set the value of the dropdown with the value from the database. The value in the database is either new, trial, maint., employee, beta, or null. I need to set the dropdrown to one of these values. An example of the select; <td> <select name="ordReason">...
14
25036
by: keri | last post by:
Hi, Simple version of the question..... How do I use the where clause of the open form command to show an account with a matching ID to be displayed when the form is opened? Eg. I select a record on a continuous form and click and edit button. The button runs the open form code. I want the APPID of the current record on the continous form to match the APPID of the record viewed
17
2751
vikas251074
by: vikas251074 | last post by:
I have create form as below - <table> <tr> <td align="right">VLAN Name : </td> <td> <select name="vlan_name" style="width:150px "> <% set rs = conn.execute("select vlan_name from vlan_master order by vlan_name") do while not rs.eof%> <option value="<%=rs("vlan_name")%>"><%=rs("vlan_name")%></option>
2
2675
by: ghetto_banjo | last post by:
Ok, i thought i had this one figured out, apparently not. Here is my code on my button click event: stDocName = "frmInvoice" stLinkCriteria = "=" & Me! DoCmd.OpenForm stDocName, , , stLinkCriteria List13 is a single column list box of invoice numbers. When I choose
0
8382
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8297
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8816
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8717
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8498
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8600
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.