dbTalk Databases Forums  

Newbie thats very confused:(

comp.database.ms-access comp.database.ms-access


Discuss Newbie thats very confused:( in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Wizard
 
Posts: n/a

Default Newbie thats very confused:( - 10-20-2005 , 04:46 AM






Hi All,

Hope Sombody could help me?

I`ve created a form with 5 Feilds on, 4 Combo Boxs, everything works great
data updates and deletes fine. The navigate is a bit clumbsy with me having
300+ records. I was going to use a ComboBox as suggested by a few ppl on
here, but i want to be able to find by either field 1, 2, 3 or 7. What i`ve
done now is add a Subform as a Datagrid so it list the info in the datagrid.
Great it all displays and I can search through it no problem.

My question is how do I get it so that when I click on a record in my
datagrid it pulls the data up in my primary form, and pupulates my Combos
and Text Box`s?

I hope i`ve not confused ppl to much?

Cheers and Many Kind thanks
Si



Reply With Quote
  #2  
Old   
The Woo
 
Posts: n/a

Default Re: Newbie thats very confused:( - 11-22-2005 , 04:00 AM






On Thu, 20 Oct 2005 10:46:19 +0100, "Wizard" <test (AT) test (DOT) com> wrote:

Quote:
Hi All,

Hope Sombody could help me?

I`ve created a form with 5 Feilds on, 4 Combo Boxs, everything works great
data updates and deletes fine. The navigate is a bit clumbsy with me having
300+ records. I was going to use a ComboBox as suggested by a few ppl on
here, but i want to be able to find by either field 1, 2, 3 or 7. What i`ve
done now is add a Subform as a Datagrid so it list the info in the datagrid.
Great it all displays and I can search through it no problem.

My question is how do I get it so that when I click on a record in my
datagrid it pulls the data up in my primary form, and pupulates my Combos
and Text Box`s?

I hope i`ve not confused ppl to much?

Cheers and Many Kind thanks
Si

Wizard,

This is my first attempt at assisting, so I hope the powers-that-be
won't laugh too hard. I had the exact same question a few years back.
It is one of the coolest aspects of my database.

I don't know if what you're asking can be done within the datagrid
view of a subform, but here's how I accomplished it...hope it works
for you.

I have a pop-up form which gets the records from a simple query. In
design view, under the "All" tab of the form's properties, select
"Continuous Forms" for the default view. Under the "Other" tab, select
"yes" for Pop Up.

I use the Form Header to place text labels which will identify each
field beneath each label. Directly below, I have my fields left-to
right in the Detail section of the form.







Now it gets a little trickier, but so worth it.
We create a macro to find the corresponding record
and change the main form to reflect the same.


This is how my macro looks:

Macro Name: Action:
mcrHyperJump OpenForm
FindRecord
GoToControl

Now you'll tell the macro what to do for each of these actions.

Click once in the OpenForm action. At the bottom (under Action
Arguments):

Form Name Type the name of your main form here
View Form
Filter Name
Where condition
Data Mode Add
Window Mode Normal

Now click once in the FindRecord action. Again at the bottom,

Find What =[TypeWhateverPrimaryIDFieldYouAreUsingHere]

For "NamesID" you'd type: =[NamesID]
with square brackets


Match Whole Field
Match Case No
Search All
Search as Formatted Yes
Only Current Field No
Find First Yes

Now click once in GoToControl. At the bottom for Control Name,
type your Primary Id (no symbols or brackets. If your primary Id is:
NamesID, you'd just type NamesID

Now save your macro with a name which uniquely identifies its purpose.
Perhaps mcrHyperJump

Go back to the pop-up form you designed as "Continuous Form." At the
extreme left or right of the Detail section (your choice), create a
command button. Use the Command Button Wizard for: Miscellaneous, Run
Macro. Find your macro from the list (mcrHyperJump) then finish the
Command button wizard by giving your button a graphic and
a name. I gave mine the "Open Folder" icon. Then I sized it very small
to fit on the form. For style's sake, the Detail section of my pop-up
form is not very tall. This gives me the most records possible on the
screen.

On your main form, Use the Command Button Wizard to create a button
which opens your pop-up form.

Now when your pop-up form appears, it should list the records from the
simple query.
Clicking the folder icon should change the main form to that record.
But some points:

1. The primary ID field needs to be on both the pop-up and main form
(ties them together I think)
2. I can't remember if I tried this on a subform. If I did and it
didn't work, my guess would be that some kind of quirky-feedback loop
is created by the sub-form being "nested"
in the main form. Try it though and let me know. The plus side to
having it as a pop-up form is that it frees-up screen space.
3. After launching the pop-up form from your main form, size and
position it. With focus on the pop-up (click once on the pop-up), hit:
control s. Now the pop-up will appear just the way you want it
whenever launched.

Hope this helps. Took a lot of head-scratching and some great help
from the awesome folks in this newsgroup. Since my news server showed
no responses to your question, I felt obligated to do my part.

Powers-that-be, feel free to edit my first assist for accuracy. Last
thing I want to do is lead anyone astray.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.