Hi Everyone, maybe you can help me out on something...
I have a table on contacts that also have a form to go with it, to add new
ones or look over the old ones.
I have another seperate form which I would like to link to the contact but
dont know how to do it.
What I want to do is to have a button on the contact form that once I click
will automatically select the name on the next form for me, so for example....
I add a new contact - name address etc I click the button, the next form will
open and the name I just added will be automatically selected in the drop-
down box I have on the next form.
So I guess I just want the drop-down to pick up on the name from the other
form and select it automatically.
Can anyone help?
Thank You and Happy Easter!
--
Message posted via http://www.accessmonster.com
|
|
0
|
|
|
|
Reply
|
evilcowstare
|
4/8/2007 6:50:21 PM |
|
If the form from which you want to select is a continuous form, that is,
showing multiple records, I'd suggest you use the Click or Double-Click
event. In that event code, you'll use the DoCmd.OpenForm statement, with a
WHERE condition. As a start, in a module window, put the cursor in the
DoCmd.OpenForm statement and read the Help.
The following (air) code might be a start, assuming the contact Records have
a key of Contact ID that is a Long Integer (could be AutoNumber), and that
ContactID is displayed in a TextBox called txtID, and that the next form is
called frmNext:
Dim strWhere as String
strWhere = "ContactID = " & Me.txtID
DoCmd.OpenForm "frmNext",,,strWhere
If your ContactID is text, the line setting the strWhere would read:
strWhere = "ContactID = """ & Me.txtID & """"
Yes, the multiple double-quotes are necessary, if that is a Text Field.
I'm not at all certain what you have in mind regarding your comment
"drop-down to pick up on the name". The above code would open the frmNext to
the proper Record without any drop-down (Combo Box) control.
Larry Linson
Microsoft Access MVP
"evilcowstare via AccessMonster.com" <u31650@uwe> wrote in message
news:70688f45553ea@uwe...
> Hi Everyone, maybe you can help me out on something...
>
> I have a table on contacts that also have a form to go with it, to add new
> ones or look over the old ones.
> I have another seperate form which I would like to link to the contact but
> dont know how to do it.
>
> What I want to do is to have a button on the contact form that once I
> click
> will automatically select the name on the next form for me, so for
> example....
>
>
> I add a new contact - name address etc I click the button, the next form
> will
> open and the name I just added will be automatically selected in the drop-
> down box I have on the next form.
>
> So I guess I just want the drop-down to pick up on the name from the other
> form and select it automatically.
>
> Can anyone help?
>
> Thank You and Happy Easter!
>
> --
> Message posted via http://www.accessmonster.com
>
|
|
0
|
|
|
|
Reply
|
Larry
|
4/9/2007 4:55:46 AM
|
|
|
1 Replies
385 Views
(page loaded in 0.426 seconds)
Similiar Articles: Automatic drop-down selection? - microsoft.public.access.forms ...Hi Everyone, maybe you can help me out on something... I have a table on contacts that also have a form to go with it, to add new ones or look over t... Form Field - Drop down selection causing auto text - microsoft ...Display Multiple Data Fields based on drop down selection ... ... ... happens in the text area after making a selection. ... automatic field ... Cannot View Drop-down Selections - microsoft.public.access.forms ...When the user clicks the arrow next to the ID field, the drop-down selections ... Automatic drop-down selection? - microsoft.public.access.forms ... Choosing a drop-down ... Open datepicker automatically on textbox selection - microsoft ...... I changed to a new computer and when I open the file now, it ... Open datepicker automatically on textbox selection - microsoft ... Automatic drop-down selection ... Display Multiple Data Fields based on drop down selection ...Automatic drop-down selection? - microsoft.public.access.forms ..... auto update of a subform - microsoft.public.access Making Automatic Updates in a form - microsoft ... Making Automatic Updates in a form - microsoft.public.access ...Automatic drop-down selection? - microsoft.public.access.forms ... Update field (multiple criteria and updates) - microsoft.public ... auto update of a subform - microsoft ... Use first day of month formula in a drop down list - microsoft ...Automatic drop-down selection? - microsoft.public.access.forms ... Use first day of month formula in a drop down list - microsoft ..... Allow>List Source: =First OK Sheet2 ... Change Automatic ID Field? - microsoft.public.accessAutomatic drop-down selection? - microsoft.public.access.forms ... When the user clicks the arrow next to the ID field, the drop-down selections ... How do I set it up to automatically capitalize the 1st letter ...Automatic drop-down selection? - microsoft.public.access.forms ..... want the drop-down to pick up on the name from the other form and select it automatically. ... Automatic Hyphenation Does Not Work - microsoft.public.word ...The automatic hyphenation feature of Word2003 works for native Word2003 documents and templates. However, it does not work for documents and templ... Automatic drop-down selection? - microsoft.public.access.forms ...Hi Everyone, maybe you can help me out on something... I have a table on contacts that also have a form to go with it, to add new ones or look over t... Default value in Drop down menu and automatic selections - ExcelBanterExcel Worksheet Functions ... hi there, I'm trying to create drop down menus that are dependen on each other. Once ... G'day Body Take a look at Debra Dalgliesh's ... Drop down with automatic selection - Dynamic Drive ForumsGeneral Coding > JavaScript ... Hi, I'm using the script below and would like to be able to automatically load a page ... Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD ... Default value in Drop down menu and automatic selections Excelhi there, I'm trying to create drop down menus that are dependen on each other. Once a value is selected in first menu, second menu will offer only item Excel Macro writing help for dropdown list automatic selection? -Excel Macro writing help for dropdown list automatic selection? I have a cell (A1) with a drop down list. I want to have a marco which automatically selects the next ... 7/15/2012 9:08:39 AM
|