473,466 Members | 1,405 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Help with the "BrowseTo" command

22 New Member
I could use some help with the BrowseTo feature in access 2010. I have searched for and read everything I can find on the web... which wasn't much.

Can browseto be used on a form other than a navigation form, if so, how do you set the file path? I have tried to follow the examples given here: http://blogs.office.com/b/microsoft-access/archive/2010/02/23/access-2010-browseto-docmd-and-macro-action.aspx and I can't get it to work.

I see a lot of similar comments on other forums... is there an expert who can help solve the mystery?

The example in the link above gives a file path for a form with several layers of subforms, and I am not sure how to apply it to my situation which is very simple...

I have a main form with two subforms, one is the continuous form (the list of contacts in the address book sample) that stores the browseto on click event, and the 2nd is the subform that is like the "name card" in the example.

Try as I might, I cannot figure out how to make this seemingly useful trick work... any and all help greatly appreciated!
Oct 2 '11 #1

✓ answered by nico5038

This is possible. Just start with the listbox with the children and use the linkage fields to a subform to the relationship table "Child/Adult"

Next add an unbound field "txtAdultID" on the parent form and add to the subform with the relationship table a OnCurrent event holding this line of code:
Expand|Select|Wrap|Line Numbers
  1. Parent.txtAdultID = Me.AdultID
  2.  
Finally add a subform for the adult and use the "txtAdultID" field in the linkage fields.

Thus selecting a child will show the related adults and their role and te selected adult will appear in the subform Adult.

Getting the idea?

Nic;o)

12 4188
nico5038
3,080 Recognized Expert Specialist
I'm always reluctant to try new Access features, especially when good "solid" alternatives are present.

For your design (Namelist showing subform with detail data) there's a simple mechanism on a main form:
1) Make a listbox with the names and (hidden) the ID in the first column.
2) Add a subform and use the linkage fields to link the subform to the value of the listbox (being the ID field)

That's all and no BrowseTo with multiple parms needed.

Nic;o)
Oct 2 '11 #2
CharT
22 New Member
Thanks- I'll give that a shot. :)
Oct 2 '11 #3
CharT
22 New Member
sorry- stuck again... maybe what I am after isn't possible...
My application is for a child welfare setting...
I have a table with 300+ kids. Every kid can have multiple adults with various relationships to the child (bio mom, care giver, foster mom, etc)

I have a form "child census". There is a page (tab) for adults that are related to that kid.

I have a relationships table that joins the child to his/her adults and defines the relationship.

I have a subform (and underlying table) for adult details such as incarcerated, drug abuse, etc.

I would like to create a list of adults (much like the example of the address book)but only those adults that are related to the child who's record is currently selected in the main child form.

I created a query with the adult id and the child id, and the child id criteria is set to the child id control in the main form. So, the query is working great... if i bring up a child in my main form, only that child's adults appear in the query results.

How do i get that query to become the record source for a list from which (with an on click event) i can load that adult's detail record in the subform???

I have used the listbox wizard, selected my query, etc, but when i go back to report view the list results (from my query) are not showing, instead, the first adult on the adult table appears and nothing else.

I know someone out there can help me... I hope!
Oct 2 '11 #4
nico5038
3,080 Recognized Expert Specialist
This is possible. Just start with the listbox with the children and use the linkage fields to a subform to the relationship table "Child/Adult"

Next add an unbound field "txtAdultID" on the parent form and add to the subform with the relationship table a OnCurrent event holding this line of code:
Expand|Select|Wrap|Line Numbers
  1. Parent.txtAdultID = Me.AdultID
  2.  
Finally add a subform for the adult and use the "txtAdultID" field in the linkage fields.

Thus selecting a child will show the related adults and their role and te selected adult will appear in the subform Adult.

Getting the idea?

Nic;o)
Oct 3 '11 #5
CharT
22 New Member
I will work on this as soon as possible and let you know how it goes. Thank you!!
Oct 3 '11 #6
CharT
22 New Member
Hello Nic, I have been trying to get this to work for several hours. I must be doing something wrong, or, I may not have described my goal clearly enough to begin with...

I would like to use a continuous form with an on click event to generate the correct record in an adjacent form.

The subform that generates the list is a continuous form, named "AdultList" who's record source is a query that selects adults that have a relationship with the current child in the main form, and includes the fields "Child id" "adult id" and "adult name". The criteria for the child id is set as the child id in the main form. This seems to be working correctly, if i select a child in my main form, the list of adults that are related are produced in the continuous subform.

The adjacent subform, named "RelationshipLookup" who's record source is a query that selects the table named "Relationships" and includes the field "adult id" and "child id"; is linked on child id to the main form. This subform also is working correctly, when a child is selected in the main form, only those adults records are generated. This form's view is set to single form. This form is for entering the details of the relationship, such as biological parent, foster parent, etc.

My goal is to be able to click on a name in the continuous form on the left side of the page, and have that record generated in the adjacent (single form view) form on the right side of the page.

I am sorry to bother you again, but I have tried to do this on my own and i am just not getting it. Can you help again please?
Oct 10 '11 #7
nico5038
3,080 Recognized Expert Specialist
Can you attach a sample .mdb with the tables and forms so I can have a look ?

Nic;o)
Oct 10 '11 #8
NeoPa
32,556 Recognized Expert Moderator MVP
@CharT
I expect Nico will be in a better position to help if you follow the instructions found in Attach Database (or other work) before attaching your database.
Oct 11 '11 #9
CharT
22 New Member
Hello all- WOW I finally got this to work... I was able to create a text box on the main form and make its source the adult id in the continuous form, then, link that text box to the detail subform adult id. I am not sure why it took so much trial and error, but it is working. There is a bit of a lag for the detail subform to populate, but it's working. Thanks so much for the continued support :)
Oct 11 '11 #10
NeoPa
32,556 Recognized Expert Moderator MVP
Excellent news :-) And well done for turning the tips passed into a working solution.

Now, if you could determine which of Nico's posts most pointed you in that direction and select it as the Best Answer then we can consider this thread completed.
Oct 11 '11 #11
CharT
22 New Member
Although I did not use the code provided, I was able to use the tips about linking child and master fields to finally get a solution. I left out one thing I did, I put the adult id control in the form header of the continuous form, so that when an adult name (in the detail section) was selected, the adult id was selected as well. I used that adult id as the source for the text box on the main form and then linked that to the detail subform. I am not sure it that is the best thing to do, but it works. Thank you again!
Oct 11 '11 #12
nico5038
3,080 Recognized Expert Specialist
Great to see you managed to get it working. I always see that as the best result, as it gives the satisfaction that you've "done it".

Success with the application !

Nic;o)
Oct 11 '11 #13

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

Similar topics

7
by: What-a-Tool | last post by:
Have no problem getting my select queries to work using this method: strSQL = "SELECT tblUI.IPAdd FROM tblUI WHERE (tblUI.IPAdd =?)" arSPrm = Array(strRemHst) Set rst = cmd.Execute(,arSPrm)...
17
by: News | last post by:
Hi everyone, My goal is to pull command switches/options from a file and then assign the values to select variables which would eventually be included in a class object. The data file looks...
3
by: cmvw | last post by:
I keep getting runtime 424 error object required when tring to run program works fine untill it gets to caculate commission any assistants would be appreciated. Private Sub...
2
by: ntsNews | last post by:
Hi, Using the built in command "Find Next" is there a way to have the Match Drop Down Menu to default to "Start of Field"... or can it be the only option? GCM
6
by: LyndsayJ | last post by:
Hi, I am working on a java program for my class where I have to rewrite a code that checks whether the input is a palindrom by passing the string as a command-line argument. Here is the code that I...
3
by: McCarthy | last post by:
Im writing a command-line program in unix. Whenever I run the prog in unix it gives me 49 output files instead of the user entered amount. Im not sure what the problem is with my main prog the loop...
2
by: Averocean | last post by:
Hi all, I am very new to python language and I need help with command line using python. I want to write a piece of python code to execute some DOS command line but I don't know the...
2
ironmonkey69
by: ironmonkey69 | last post by:
I need help being able to pass a number from a command line into a script that zeroes out columns of a text file. Using python 2.0. Here is what the text file looks like: #Number of Bits 12 ...
6
AmberJain
by: AmberJain | last post by:
Well, I supppose in linux we can simply get help about gcc from terminal by typing "man gcc" command. Now I tried "man gcc" or "gcc/?" on windows, but failed to get any help from command prompt....
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
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
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...
0
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...
0
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
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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.