I guess this is simple, but I'm stuck.
I am trying to write a simple app - Newspapers and their circulation by
town.
tables:
tblPaper - ID (autonum, key) and Newspaper (indexed)
tblTown - ID (autonum, key) and Town(indexed)
tblPaperTown - PaperID, TownID, DailyCirc, SundayCirc
I have a form, frmPapersAndTow ns, that opens with a combo box and the
nav bar at the bottom. Combo box is cbopaper.
Data: SELECT [tblNewspaper].[NewspaperID], [tblNewspaper].[Newspaper]
FROM tblNewspaper;
AfterUpdate:
Private Sub cboPaper_AfterU pdate()
Forms![frmPapersAndTow ns]![sfrmTownsForPap er].Visible = True
DoCmd.ShowAllRe cords
Me.cboPaper.Req uery
End Sub
Format: 2 cols, bound =1, width 0,2"
This works if I choose a paper from the dropdown box. But if I use the
nav bar on the bottom, nothing happens. The record count says 10
(correct) and the number changes, the screen blinks, but the data in
the combo box and on the subform stays the same.
I'm still new to forms - thanks.
sara 7 1738
sara wrote: I guess this is simple, but I'm stuck.
I am trying to write a simple app - Newspapers and their circulation by town.
tables: tblPaper - ID (autonum, key) and Newspaper (indexed) tblTown - ID (autonum, key) and Town(indexed) tblPaperTown - PaperID, TownID, DailyCirc, SundayCirc
I have a form, frmPapersAndTow ns, that opens with a combo box and the nav bar at the bottom. Combo box is cbopaper. Data: SELECT [tblNewspaper].[NewspaperID], [tblNewspaper].[Newspaper] FROM tblNewspaper;
AfterUpdate: Private Sub cboPaper_AfterU pdate() Forms![frmPapersAndTow ns]![sfrmTownsForPap er].Visible = True
DoCmd.ShowAllRe cords Me.cboPaper.Req uery
End Sub
Format: 2 cols, bound =1, width 0,2"
This works if I choose a paper from the dropdown box. But if I use the nav bar on the bottom, nothing happens. The record count says 10 (correct) and the number changes, the screen blinks, but the data in the combo box and on the subform stays the same.
I'm still new to forms - thanks. sara
What are you expecting to happen? Is the ComboBox bound or are you using it
to navigate on the main form? A ComboBox can be used for one of those
operations, but not both.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
I am expecting the form to display the "NEXT" newspaper and all the
towns/circulation associated with it.
The combo box is unbound. I don't think I am using it to navigate on
the main form, but then again, I'm not sure I really know what
"Navigate on the main form means". I am using it to select the
newspaper for which the user would like to see the towns/circ. Nothing
else. Select a paper from the drop-down; see the subform with all the
towns/circ.
Sorry to be so dense - this is all new to me.
Sara
I am expecting the form to display the "NEXT" newspaper and all the
towns/circulation associated with it.
The combo box is unbound. I don't think I am using it to navigate on
the main form, but then again, I'm not sure I really know what
"Navigate on the main form means". I am using it to select the
newspaper for which the user would like to see the towns/circ. Nothing
else. Select a paper from the drop-down; see the subform with all the
towns/circ.
Sorry to be so dense - this is all new to me.
Sara
I am expecting the form to display the "NEXT" newspaper and all the
towns/circulation associated with it.
The combo box is unbound. I don't think I am using it to navigate on
the main form, but then again, I'm not sure I really know what
"Navigate on the main form means". I am using it to select the
newspaper for which the user would like to see the towns/circ. Nothing
else. Select a paper from the drop-down; see the subform with all the
towns/circ.
Sorry to be so dense - this is all new to me.
Sara
I am expecting the form to display the "NEXT" newspaper and all the
towns/circulation associated with it.
The combo box is unbound. I don't think I am using it to navigate on
the main form, but then again, I'm not sure I really know what
"Navigate on the main form means". I am using it to select the
newspaper for which the user would like to see the towns/circ. Nothing
else. Select a paper from the drop-down; see the subform with all the
towns/circ.
Sorry to be so dense - this is all new to me.
Sara
sara wrote: I am expecting the form to display the "NEXT" newspaper and all the towns/circulation associated with it.
The combo box is unbound. I don't think I am using it to navigate on the main form, but then again, I'm not sure I really know what "Navigate on the main form means". I am using it to select the newspaper for which the user would like to see the towns/circ. Nothing else. Select a paper from the drop-down; see the subform with all the towns/circ.
Sorry to be so dense - this is all new to me. Sara
Sounds like you are inter-mixing different concepts.
Normally the MasterLink ChildLink properties of a subform will create a link
between one or more fields in the two data sets so that when you navigate in
the parent record you see the corresponding records in the subform. When
this is set correctly it won't matter HOW the parent form is navigated. You
could use the buttons, apply a filter, change the sort order, etc., and
regardless of the methof used the subform will stay synchronized.
Your MasterLink property appears to be pointing to the ComboBox and since
that is unbound it does not respond to record navigation of the parent form.
Ergo, since the subform is responding to the Unbound CombBox it is not
responding to navigation in the parent either.
Now, if you were to bind the ComboBox then any time you changed it you would
be editing the current parent record and I don't think you want that either.
What you want is to set the MasterLink property of the subform to the
appropriate field in the parent form so that the subform responds as you use
the navigation buttons. Then delete the existing ComboBox and add back a
new one making sure that the ToolBox wizard is enabled.
One of the wizard choices for a ComboBox creates a ComboBox that causes the
form to navigate to the record with the matching value selected from the
list. If you use that you will end up with a "Navigation ComboBox". It
will not be bound, but code will run each time you make an entry that causes
the parent record to move to a that record. With your subform MasterLink
now properly set it will stay synchronized with the parent form regardless
of whether you use the ComboBox to navigate or the normal navigation
buttons.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
sara wrote: I am expecting the form to display the "NEXT" newspaper and all the towns/circulation associated with it.
The combo box is unbound. I don't think I am using it to navigate on the main form, but then again, I'm not sure I really know what "Navigate on the main form means". I am using it to select the newspaper for which the user would like to see the towns/circ. Nothing else. Select a paper from the drop-down; see the subform with all the towns/circ.
Sorry to be so dense - this is all new to me. Sara
Sounds like you are inter-mixing different concepts.
Normally the MasterLink ChildLink properties of a subform will create a link
between one or more fields in the two data sets so that when you navigate in
the parent record you see the corresponding records in the subform. When
this is set correctly it won't matter HOW the parent form is navigated. You
could use the buttons, apply a filter, change the sort order, etc., and
regardless of the methof used the subform will stay synchronized.
Your MasterLink property appears to be pointing to the ComboBox and since
that is unbound it does not respond to record navigation of the parent form.
Ergo, since the subform is responding to the Unbound CombBox it is not
responding to navigation in the parent either.
Now, if you were to bind the ComboBox then any time you changed it you would
be editing the current parent record and I don't think you want that either.
What you want is to set the MasterLink property of the subform to the
appropriate field in the parent form so that the subform responds as you use
the navigation buttons. Then delete the existing ComboBox and add back a
new one making sure that the ToolBox wizard is enabled.
One of the wizard choices for a ComboBox creates a ComboBox that causes the
form to navigate to the record with the matching value selected from the
list. If you use that you will end up with a "Navigation ComboBox". It
will not be bound, but code will run each time you make an entry that causes
the parent record to move to a that record. With your subform MasterLink
now properly set it will stay synchronized with the parent form regardless
of whether you use the ComboBox to navigate or the normal navigation
buttons.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Halldór Ísak Gylfason |
last post by:
In my application I have an iframe that is empty (and not visible)
initially, however when a user presses a button a form is
programmatically submitted and the target is set to the IFrame.
I want to detect when the frame has been loaded with the result of the
form submit.
Of course I have tried some event handlers like onload, onactivate,
onreadystatechange, but they do not work in this example. They only
seem to work, when the "SRC"...
|
by: AnnMarie |
last post by:
My JavaScript Form Validation doesn't work at all in Netscape, but it
works fine in IE.
I made some of the suggested changes which enabled it to work in IE.
I couldn't make all the changes because then it didn't work in IE.
How can I enable this javascipt form validation to work in Netscape?
When I use netscape, none of the alert boxes appear. It submits the
form without validating anything.
|
by: Paxton |
last post by:
I created an html email containing a form whose method is POST. The
form is posted to an asp page for processing, but no values are
retrieved. So I response.write all the Request.Form fields, and nothing
appears. I change the form's method to GET, then response.write the
Request.QueryString items (which I can see in the URL) and it works fine.
I need to use POST, as the quantity of data from the form will often
exceed the limits of...
|
by: 42 |
last post by:
I implemented a simple class inherited from Page to create a page
template. It simply wraps some trivial html around the inherited page,
and puts the inherited page into a form.
The problem I have run into is that the emitted html at the end of the
process is slightly different and doesn't work.
Please don't be put off by all the source code. All the guts are in this
first base class, and it doesn't do much. The rest is trivial...
|
by: Alex Sibilev |
last post by:
Hello,
I have a really weird problem I've been trying to solve it without any luck
for the last couple of hours :(
I'm writing a "conference board" application (quite similar to ASP.NET
forum).
I don't use server controls in it (apart from Page).
The problem occurs on the page where visitor can post a new messages.
Basically, it's a form with couple of
| |
by: ortaias |
last post by:
I have a form which calls up a second form for purposes of data entry.
When closing the data entry form and returning to the main form, things
don't work as expected.
When I return to the main form, I trigger the on acitvate event to run
a macro. I can use the Dlookup function to update my fields, which is
OK. However, I intitially tried to use the Repaint Object command to
repaint the form. That did not work. Though I solved the...
|
by: Duncan |
last post by:
Hi
I'm learning c# 2.0 as I feel I need to be able to switch between vb & c#,
I'm just starting with a few simple examples and I've come across a problem.
I've got two forms ones an MDI parent & ones a child form.
I've put this code into a menustrip on the parent form
private void maintainClientsToolStripMenuItem_Click(object sender,
EventArgs e)
{
|
by: Chris |
last post by:
Hi,
I have a form for uploading documents and inserting the data into a mysql
db. I would like to validate the form. I have tried a couple of Javascript
form validation functions, but it appears that the data goes straight to the
processing page, rather than the javascript seeing if data is missing and
popping up an alert. I thought it may be because much of the form is
populated with data from the db (lists, etc.), but when I leave...
|
by: Rik |
last post by:
Hello guys,
now that I'm that I'm working on my first major 'open' forms (with
uncontrolled users I mean, not a secure backend-interface), I'd like to add
a lot of possibilities to check wether certain fields match certain
criteria, and inform the user in different ways when the data is wrong
(offcourse, this will be checked on posting the data again, but that's
something I've got a lot of experience with).
Now, offcourse it's...
|
by: Jerim79 |
last post by:
I need to create a form that takes a number that the user enters, and
duplicates a question the number of times the user entered. For
instance, if the customer enters 5 on the first page, when they press
next the form generates "How old are you?" 5 times on the page. The
customer will answer all 5 questions then press next. Finally, all the
local variables get dynamically created and written to a database.
I have already taken care of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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 we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |