473,503 Members | 1,662 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 1349
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.form!ControlName.setfocus

> 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
5255
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...
3
2319
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...
4
2976
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...
4
2339
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...
3
2120
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...
3
6413
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...
5
13812
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...
14
24983
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...
17
2734
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 "> <% ...
2
2662
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, , ,...
0
7083
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...
0
7278
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,...
0
7328
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...
1
6988
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...
0
5578
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5011
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3153
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1510
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 ...

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.