Subject: Trying to open up a record in a form called "fmappointment" when clicking on a "looks like hyperlink" text box called "ContactID"
I have made many instances of this in my database but in this case I am having a setup problem and getting the error "insert perameter"
NOTE: when I do insert the record number in the pop up box the correct record does show
What I have
Text Box - "ContactID" on "Datessubform"
Main Form -"Frmcalendar"
Subform - "Datessubform" inserted into "Frmcalendar"
(1) I have made a macro in the text box of "contactId" which I have made to look like a hyperlink on "Datessubform"
(2) In the "click" event I have inserted
[contactID]=[forms]![FrmCalendar]![Datessubform]![contactid]
NOTE: The main form is a calendar "frmcalendar" with 37 subforms "datessubform" that is a continous form with names "SF1 thru SF37"
I have tried many, many variations to make this work with no luck. The closest I can get is to open up the first record in the "fmappointment" not the one I am requesting.
I have tried to give as much information as possible - if more is needed please ask.
Time for me to ask the pros for some advice!
Thanks
Gary
16 5949 nico5038 3,080
Recognized Expert Specialist
Your assignment:
[contactID]=[forms]![FrmCalendar]![Datessubform]![contactid]
should be:
[contactID]=[forms]![FrmCalendar]![Datessubform]!Form![contactid]
when activated in the main form.
Else use:
[contactID]=Me![contactid]
Just check: Forms: Refer to Form and Subform properties and controls
(Many other useful info there :-)
Nic;o)
Nic;o)
Thanks for the suggesstions. unfortunately they gave me the same result with a paramenter error.
I will research the link you supplied.
thanks
Gary
nico5038 3,080
Recognized Expert Specialist
Hmm, the "parameter request" often points to a wrong field name in a query / form's record source. Did you check that ?
Just try to find the field the popup refers to and check or that field is in the table.
Nic;o)
FishVal 2,653
Recognized Expert Specialist @GLEberts
Did you "insert" this expression to OnClick property or to event handling code?
What I did is:
(1) Used the Wizard Macro builder
(2) Inserted the Macro into the "OnClick" for CONTACTID
(3) Used open form for the action
(4) in the where condition inserted contactID]=[forms]![FrmCalendar]![Datessubform]![contactid]
Some other information:
I am running the form off a query not a table
2nd Part
I have double checked the pop up which is "Enter Parameter Value" which in this case refers to the "contactId" when I do insert the contactid that I want the correct record comes up.
I have gone through the query,table and form - had no luck coming across any mispelled words or wrong inputs.
Thanks
Gary
nico5038 3,080
Recognized Expert Specialist
As stated before, the condition should be:
[contactID]=[forms]![FrmCalendar]![Datessubform]!Form![contactid]
When this doesn't work, can you take a screen shot of the "param" message and attach that here?
Nic;o)
I have attached a copy of the screen when the pop up comes up.
Thanks for reviewing it.
Gary
nico5038 3,080
Recognized Expert Specialist
I'm interested in the exact message text, so just the popup will do.
This is too small to read :-)
Nic;o)
the pop up says
Enter Parameter Value
forms!frmcalendar!datessubform!form!contactId
Gary
FishVal 2,653
Recognized Expert Specialist @GLEberts
Does it mean form having name [datessubform] is embedded in 37 Subform controls having names "SF1 thru SF37"?
yes that is correct.
Reference: I am using the shell of the calendar on the thread:
"Ms Access Calendar"
MyWaterloo
Thanks for your help!
Gary
FishVal 2,653
Recognized Expert Specialist
So, you should use Subform control name in your reference instead fo form name.
for example
[forms]![FrmCalendar]![SF1]!Form![contactid]
instead of
[forms]![FrmCalendar]![Datessubform]!Form![contactid]
I noticed that you did not use brackets around "Form"
[forms]![FrmCalendar]![SF1]!Form![contactid]
when I input that and then save - it automatically puts brackets around [form]
then gives me the "Enter Parameter Value" with
[forms]![frmcalendar]![SF1]![Form]![ContactID]
I have tried that variation along with others with no success
Below is the closest thing I can use that does not bring up the "Enter Paramenter Value" pop up box.
however it takes me to the first record in the table - not the one that I am clicking on.
[contactid]=[Forms]![FrmCalendar]![SF1].[Form].[contactid]
after researching the "enter paramenter value" pop up it seems that it comes back to the same thing - table, query or form value.
I have gone back through everything over and over again and can not find anything wrong with any imputs of names in any of the above.
I am using this feature to click on a text box and open up a form with the record in a few other places in the database with no issues. Even searching the same table "tblappointments".
seems that I am missing something very simple and can't grasp it.
frustrated
Gary
nico5038 3,080
Recognized Expert Specialist
I should start with warning you that you're trying to rebuild Outlook and that I personally would use Outlook and interface my Access .mdb with automation.
One solution is to drop your macro and use VBA instead.
Just code in the OnClick event of the field contactid on the Datessubform: -
DoCmd.Openform "fmappointment",,,"[contactid]="& Me.contactid
-
Nic;o)
Thanks for the suggestion and recommendation.
I tired to work the VB first with the wrong code - I have only had 1 night course and still very much a novice. I then went to the Macro thinking it was easier to build.
your solution worked like a charm.
I like your recommendation about the automation I am going to spend some time researching it - sounds like probably the way to go.
I was reading the line below - seems to have the info but if you have others that you think would be a good learning and research tool I would appreciate any feedback. Using Automation in Microsoft Office Access 2003 to Work with Microsoft Office Outlook 2003
thanks for your help.
Gary
nico5038 3,080
Recognized Expert Specialist
This is indeed a good start, but also almost every "In depth" Access VBA book will handle automation. With my A2000 came also a programmers guide with much valuable information on the subject.
Glad I could help and much success with your application !
Nic;o)
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Mark C |
last post by:
I have a unbound form with a tab control with four tabs in an Access 97
database. On each tab I have a sub form each form on the sub forms is bound
to its own table. Each table has a field that can...
|
by: John |
last post by:
I have 1 table: tbl_main
primary key is a field called JobNo
1 query: qry_main (this simply has all fields and just places the JobNo
field in ascending order).
I have 2 forms
frm_main...
|
by: 4004 |
last post by:
I would like to open a columnar form (so I can see all the details)
from a datasheet form (so I can see what is there) but keep the same
recordset and current record.
I can do the recordset set...
|
by: davegb |
last post by:
I'm creating a simple, or at least it should be simple, database to
track the employees in our group. I've created a switchboard form, and
want to put a button on it to open the form in which we...
|
by: Timbo |
last post by:
Hi there,
I’m not used to working in VB and I think this situation calls for excactly that. I use Access 97 SR-2.
My first table is a table containing all the Tickets I got. The field ”Ticket”...
| |
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...
|
by: CJONES |
last post by:
I have a main form and use a combo box to open a pop up form. The
combo box lists customers and only one customer requires the fields
that are found on the pop up form.
I can get the form to pop...
|
by: susan |
last post by:
Hi,
Is it (in Access2003) possible yo link from a form in db1 to a form in db2?
Thanks,
Susan
|
by: trixxnixon |
last post by:
i have a form that is being designed to pend requests in a requests database.
the pend form is opened from an update form used by an employee to enter updates. when the pend form is updated, the...
|
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,...
|
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...
| |
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...
|
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,...
|
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
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 ...
| |