If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Weird behavior
Hi,
I have created a database of all the DVDs that I own, everything works fine except for a form. In that form I ahve the information about the actors, the list of the actors is a dropdown, which is setup to create a filter i.e. show directly the name that I chose, but when I open the form I get the information for the first actor, but not the name. Is it possible to make the name of the first actor to appear ? -- Thank you in Advance Merci a l'Avance Martin |
#2
|
|||
|
|||
Weird behavior
"Martin Racette" wrote in message
Hi, I have created a database of all the DVDs that I own, everything works fine except for a form. In that form I ahve the information about the actors, the list of the actors is a dropdown, which is setup to create a filter i.e. show directly the name that I chose, but when I open the form I get the information for the first actor, but not the name. Is it possible to make the name of the first actor to appear ? I imagine that the combo box is unbound, as it should be to allow you to navigate or filter the form to the selected record. If you don't have any other control on the form, such as a text box, to show the ActorName field from the current record, then you'll need either to add such a control, or use the form's Current event to set the value of the combo box to match the current record. The exact code to do this will depend on the following properties of the combo box, so please post them: Name Row Source Bound Column If the Row Source property is a query, please post the SQL of the query. If it's a table, please post the name and data type of the table field that is the combo box's bound column. Also please post the Record Source of the form. If it's a query, please post the SQL; if a table, please post the list of fields and their types. -- Dirk Goldgar, MS Access MVP www.datagnostics.com (please reply to the newsgroup) |
#3
|
|||
|
|||
Weird behavior
Here is the information requested
Name : ActorName Row Source : SELECT Actor.ActorID, Actor.Name FROM Actor ORDER BY [Name]; Bound Column : 1 The form itself is based on a table: ActorID = AutoNumber Name = Text Gender = Text Birthdate = Date/Time Bio = Memo The combo as you already expected it is unbound and is link to a macro which do the filtering: Name = Actorlisting Condition = [Forms]![Listing of Actor]![ActorName] Action = ApplyFilter StopMacro -- Thank you in Advance Merci a l'Avance Martin "Dirk Goldgar" wrote in message ... "Martin Racette" wrote in message Hi, I have created a database of all the DVDs that I own, everything works fine except for a form. In that form I ahve the information about the actors, the list of the actors is a dropdown, which is setup to create a filter i.e. show directly the name that I chose, but when I open the form I get the information for the first actor, but not the name. Is it possible to make the name of the first actor to appear ? I imagine that the combo box is unbound, as it should be to allow you to navigate or filter the form to the selected record. If you don't have any other control on the form, such as a text box, to show the ActorName field from the current record, then you'll need either to add such a control, or use the form's Current event to set the value of the combo box to match the current record. The exact code to do this will depend on the following properties of the combo box, so please post them: Name Row Source Bound Column If the Row Source property is a query, please post the SQL of the query. If it's a table, please post the name and data type of the table field that is the combo box's bound column. Also please post the Record Source of the form. If it's a query, please post the SQL; if a table, please post the list of fields and their types. -- Dirk Goldgar, MS Access MVP www.datagnostics.com (please reply to the newsgroup) |
#4
|
|||
|
|||
Weird behavior
"Martin Racette" wrote in message
news Here is the information requested Name : ActorName Row Source : SELECT Actor.ActorID, Actor.Name FROM Actor ORDER BY [Name]; Bound Column : 1 The form itself is based on a table: ActorID = AutoNumber Name = Text Gender = Text Birthdate = Date/Time Bio = Memo The combo as you already expected it is unbound and is link to a macro which do the filtering: Name = Actorlisting Condition = [Forms]![Listing of Actor]![ActorName] Action = ApplyFilter StopMacro Martin "Dirk Goldgar" wrote in message ... "Martin Racette" wrote in message Hi, I have created a database of all the DVDs that I own, everything works fine except for a form. In that form I ahve the information about the actors, the list of the actors is a dropdown, which is setup to create a filter i.e. show directly the name that I chose, but when I open the form I get the information for the first actor, but not the name. Is it possible to make the name of the first actor to appear ? I imagine that the combo box is unbound, as it should be to allow you to navigate or filter the form to the selected record. If you don't have any other control on the form, such as a text box, to show the ActorName field from the current record, then you'll need either to add such a control, or use the form's Current event to set the value of the combo box to match the current record. The exact code to do this will depend on the following properties of the combo box, so please post them: Name Row Source Bound Column If the Row Source property is a query, please post the SQL of the query. If it's a table, please post the name and data type of the table field that is the combo box's bound column. Also please post the Record Source of the form. If it's a query, please post the SQL; if a table, please post the list of fields and their types. I see you are using a macro to apply the filter. Since I am more conversant with VBA than with macros, I'll suggest a VBA procedure, rather than a macro, for your form's Current event. If you don't want to use VBA, or if you aren't sure how to implement it, please let me know and I'll work out the macro equivalent. On the Event tab of the form's property sheet, set the On Current line to [Event Procedure] Then click the "build" button (captioned "...") at the end of the line. That will create and display the shell of an event procedure that will look like this: Private Sub Form_Current() End Sub Fill in the shell so that it looks like this: Private Sub Form_Current() Me!ActorName = Me.ActorID End Sub That should do it. I'm a little concerned about one thing, though. If you don't have a text box on your form that is bound to the field Actor.Name, how are you going to add new actors? -- Dirk Goldgar, MS Access MVP www.datagnostics.com (please reply to the newsgroup) |
#5
|
|||
|
|||
Weird behavior
This form is only to see the actor information and nothing else, I can also make
change to the data itself but not the actor name, which is added in the form where I add my new DVD movies -- Thank you in Advance Merci a l'Avance Martin "Dirk Goldgar" wrote in message ... "Martin Racette" wrote in message news Here is the information requested Name : ActorName Row Source : SELECT Actor.ActorID, Actor.Name FROM Actor ORDER BY [Name]; Bound Column : 1 The form itself is based on a table: ActorID = AutoNumber Name = Text Gender = Text Birthdate = Date/Time Bio = Memo The combo as you already expected it is unbound and is link to a macro which do the filtering: Name = Actorlisting Condition = [Forms]![Listing of Actor]![ActorName] Action = ApplyFilter StopMacro Martin "Dirk Goldgar" wrote in message ... "Martin Racette" wrote in message Hi, I have created a database of all the DVDs that I own, everything works fine except for a form. In that form I ahve the information about the actors, the list of the actors is a dropdown, which is setup to create a filter i.e. show directly the name that I chose, but when I open the form I get the information for the first actor, but not the name. Is it possible to make the name of the first actor to appear ? I imagine that the combo box is unbound, as it should be to allow you to navigate or filter the form to the selected record. If you don't have any other control on the form, such as a text box, to show the ActorName field from the current record, then you'll need either to add such a control, or use the form's Current event to set the value of the combo box to match the current record. The exact code to do this will depend on the following properties of the combo box, so please post them: Name Row Source Bound Column If the Row Source property is a query, please post the SQL of the query. If it's a table, please post the name and data type of the table field that is the combo box's bound column. Also please post the Record Source of the form. If it's a query, please post the SQL; if a table, please post the list of fields and their types. I see you are using a macro to apply the filter. Since I am more conversant with VBA than with macros, I'll suggest a VBA procedure, rather than a macro, for your form's Current event. If you don't want to use VBA, or if you aren't sure how to implement it, please let me know and I'll work out the macro equivalent. On the Event tab of the form's property sheet, set the On Current line to [Event Procedure] Then click the "build" button (captioned "...") at the end of the line. That will create and display the shell of an event procedure that will look like this: Private Sub Form_Current() End Sub Fill in the shell so that it looks like this: Private Sub Form_Current() Me!ActorName = Me.ActorID End Sub That should do it. I'm a little concerned about one thing, though. If you don't have a text box on your form that is bound to the field Actor.Name, how are you going to add new actors? -- Dirk Goldgar, MS Access MVP www.datagnostics.com (please reply to the newsgroup) |
Thread Tools | |
Display Modes | |
|
|