Form textbox refresh problem

Hello!

I have two forms.  One is bound to a table of volunteers, the other is bound
to a table of their efforts.  The effort form gets data about the volunteers
in a one-to-many fashion (one volunteer, hopefully many efforts).  In the
effort table, we have fields for PeopleID, but that's it.  In the people
table, we have no identifiers for effort.

I'd like to be able to display the volunteer's first and last name on the
effort form, so that the user can tell what's going on "behind the scenes"
and to prevent entry error.  For the first volunteer I choose, there's no
problem with this- it'll display, qiute nicely, PeopleID: 1, Name: John Smith.
However, when I leave the effort form, choose another person, and come back,
the Name field doesn't refresh.  I'll get the correct PeopleID, but the old
name, no matter how many people I re-select.  I can get down to PeopleID: 53,
and the name will still display as John Smith.

I've checked the code behind the boxes; the Properties are identical between
the two, except for the lack of a Control Source for Name (Name is not
actually the name of the field, no worries there).  I've tried setting a
query up as the control source, but no dice.  I'd be happy to have a query
set up as the record source, but right now I have first and last name in one
field, concatenated for user ease (we have many people with long first names
and short last names, and vice versa), and I've no idea if I can even do that
with a sql query.

Any sort of suggestions would be very helpful.  Thanks in advance.

-- 
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200706/1

0
BonnieW
6/1/2007 8:57:24 PM
access.formscoding 7493 articles. 0 followers. Follow

2 Replies
1077 Views

Similar Articles

[PageSpeed] 7

You need to have a people form with a SUBFORM for efforts.  The link between 
the master and child forms would be PeopleID

HTH
Damon

"BonnieW via AccessMonster.com" <u33846@uwe> wrote in message 
news:73109a710ddb2@uwe...
> Hello!
>
> I have two forms.  One is bound to a table of volunteers, the other is 
> bound
> to a table of their efforts.  The effort form gets data about the 
> volunteers
> in a one-to-many fashion (one volunteer, hopefully many efforts).  In the
> effort table, we have fields for PeopleID, but that's it.  In the people
> table, we have no identifiers for effort.
>
> I'd like to be able to display the volunteer's first and last name on the
> effort form, so that the user can tell what's going on "behind the scenes"
> and to prevent entry error.  For the first volunteer I choose, there's no
> problem with this- it'll display, qiute nicely, PeopleID: 1, Name: John 
> Smith.
> However, when I leave the effort form, choose another person, and come 
> back,
> the Name field doesn't refresh.  I'll get the correct PeopleID, but the 
> old
> name, no matter how many people I re-select.  I can get down to PeopleID: 
> 53,
> and the name will still display as John Smith.
>
> I've checked the code behind the boxes; the Properties are identical 
> between
> the two, except for the lack of a Control Source for Name (Name is not
> actually the name of the field, no worries there).  I've tried setting a
> query up as the control source, but no dice.  I'd be happy to have a query
> set up as the record source, but right now I have first and last name in 
> one
> field, concatenated for user ease (we have many people with long first 
> names
> and short last names, and vice versa), and I've no idea if I can even do 
> that
> with a sql query.
>
> Any sort of suggestions would be very helpful.  Thanks in advance.
>
> -- 
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200706/1
> 


0
Damon
6/2/2007 12:35:07 AM
That'd make it too easy. :)  If I were developing this from scratch, that's
absolutely what I'd do, but I'm "fixing" an old setup that the users & my
bosses would very much like to keep around.

Perhaps someone might be able to error-check something for me.  I'm currently
using this expression for the recordsource of that textbox:
=[Forms]![tablePeople]![Firstname] & " " & [Forms]![tablePeople]![Lastname]
which works great for the first time the form is used, but fails to refresh
on subsequent uses.  Is there anything inherently wrong with that code?

Also, when I refresh my Effort form from a command button on the People form,
nothing actually refreshes.  This is the code I use, which doesn't give me
any errors, and works apart from the refresh issue.

Private Sub Command28_Click()
'the "record the valiant effort of this volunteer" button

On Error GoTo Err_Command28_Click
   Dim stDocName As String
   Dim stLinkCriteria As String
   stDocName = "frmVolEffortGen"
        
'check to see that a name is actually selected
If IsNull(Me!LastName) Then
    MsgBox "Choose a volunteer, or create a new one."
    Cancel = True
    Me!Combo26.SetFocus
    'if frmVolEffortGen is loaded
    ElseIf CurrentProject.AllForms("frmVolEffortGen").IsLoaded Then
    'go to the form...
    Forms![frmVolEffortGen].SetFocus
    DoCmd.GoToRecord , frmVolEffortGen, acNewRec
    'DoCmd.GoToRecord , , acNewRec
    'update the control with names
    Forms![frmVolEffortGen].Requery
    Forms![frmVolEffortGen]![VolName].Requery
   Else
    'open the form (@newrecord), set focus to a control
    DoCmd.OpenForm "frmVolEffortGen"
    DoCmd.GoToRecord , , acNewRec
End If
    

Exit_Command28_Click:
    Exit Sub

Err_Command28_Click:
    MsgBox Err.Description
    Resume Exit_Command28_Click
    
End Sub

Is there something wrong with that, somewhere? It looks fine to me, but one
reading of Access VBA for Dummies does not an expert make, unfortunately.

Damon Heron wrote:
>You need to have a people form with a SUBFORM for efforts.  The link between 
>the master and child forms would be PeopleID
>
>HTH
>Damon
>
>> Hello!
>>
>[quoted text clipped - 33 lines]
>>
>> Any sort of suggestions would be very helpful.  Thanks in advance.

-- 
Message posted via http://www.accessmonster.com

0
BonnieW
6/4/2007 3:06:44 PM
Reply:

Similar Artilces:

Font Size in Labels on Forms
How can I change the font size on a label in a form. There is no obvious option (in 97'). I have tried font.size = 12 etc to no avail... Cheers.... -- The Zero ST This worked in xl2003: Me.Label1.Font.Size = 12 Craig Coope wrote: > > How can I change the font size on a label in a form. There is no > obvious option (in 97'). > > I have tried font.size = 12 etc to no avail... > > Cheers.... > > -- > The Zero ST -- Dave Peterson On Fri, 16 Mar 2007 18:53:50 -0500, Dave Peterson <petersod@verizonXSPAM.net> wrote: >This worked in xl200...

sql update problem
I'm using a variable of adodb.connection type to first insert a recoord, and then update the records aditional fields using the sql update, inserting a record is know problem, updating the additional fields is proving to be a problem. when ever I run the program with breakpoints, the sql update function updates the record know problem; but as i try to execute program without know breakpoint; it executes succesfully, but it does not updste the record. It's as if the program was to fast to stop & update the data -- RzaXL You will need to show some code. RBS ...

IoSetDeviceInterfaceState problem when used with multiple instance
Hi - I am using an interface to signal an application from a kernel driver. The driver call IoSetDeviceInterface state to change the status which is monitored by the application via WM_DEVICECHANGE messages. With a single instance of the interface everything works fine. However, with multiple instances of the interface, sometimes the application does not see all the notifications. This behavior occurs ONLY in Vista & Windows 7; XP works fine. The instances of the driver interface are created by specifying the ReferenceString parameter to IoRegisterDeviceInterface(). ...

Relaying Problem
I have Exchange 2000. I have a Linux box that is running mailman. The address of the Linux box is ex: mailman.mydomain.com. I have an MX record in my DNS for mailman.mydomain.com to point to the Linux Box. However, just MyDomain.com points to my exchange box. Now, when I try to send a message via exchange I get an error: unable to relay for list@mailman.mydomain.com Any ideas on why this is happening? What can I do to fix it? My web servers use this Exchange box to subscribe people to mail lists, and I get tons of errors from this. Any help would be appreciated. -Phil "Phil Gr...

socket problems
I've put my code for a CSocket class below, since my=20 computer hangs when it is executed. Why? I have made my own CSocket class like this: #include "stdafx.h" #include "CSocket.h" CSocket:: CSocket(int port) { Reset(port); if (bind(m_Socket, (SOCKADDR*) &m_sockaddr, sizeof (sockaddr)) =3D=3D SOCKET_ERROR) { int lastError =3D WSAGetLastError(); if (lastError =3D=3D WSANOTINITIALISED) throw CSocketException("A=20 successful WSAStartup must occur before using this=20 function."); else if (lastError =3D=3D WSAENETDOWN) throw CSocketExcepti...

Exchange2003 RPC over HTTP problem
I have tried to set up a simple configuration: a Windows2003 server with two network adapters. In one network I have an Exchange 2003 server and in the other network I had setup an Outlook 2003 client. The main purpose for this configuration is to get my client to connect to my Exchange server using RPC over HTTP using this simple configuration and only after this succeds, I want to install ISA Server 2004 on my two NICs server. The two NICs server is routing-enabled so there is proper TCP/IP communication between my two networks (succesfuly tested). I have configured my Outlook 2003 c...

Sum value between dates problem driving me mad!2
Good Evening All, Many aplogies for the crappy formatting of my previous post, I have done it properly (I hope) now. I am really struggling here, have tried, nested IF's including AND's but am a bit stumped. I am fairly familiar with Arrays, but cannot seem to combine all. I have a data table (as detailed below). I simply wish to calculate the expected totals per month. Any help & assistance with this would be most welcome. Cheers, Mathew Note, earliest Start is 01/04/03 Start Finish DayRate Apr-2003 May-2003 Jun-2003 ...

Outgoing SMTP problem [exchange 2003]
In my new installation of Exchange 2003 SP 3 on Windows 2003 Server SP1, a problem re-occurs that was supposed to have been fixed with SP1 or a hotfix for prior versions. Outgoing email to domains using some kind of DNS load balancing and multiple MX records is almost certain to fail. The KB article is: <http://support.microsoft.com/kb/837993/> "The SMTP service does not fail over to the next MX record after the remote SMTP host for an MX record responds with a 4xx error" I am running Microsoft ESMTP MAIL Service, Version: 6.0.3790.1830 Is anyone else experiencing the...

Excel VBA
I can't seem to find the 'Draw" menu in Excel VBA... Am I correct in assuming that there is none? And that the Frame is the only way to group stuff on a Form?? thanks The frame is typical, but you can group some controls by using the GroupName. If you want lines on the userform, I think lots of people use a label that's really skinny--or use a picture of a line and then use that picture. tmb wrote: > > I can't seem to find the 'Draw" menu in Excel VBA... > > Am I correct in assuming that there is none? > > And that the Frame is the onl...

Installation Problems
Whenever I try to install Visio Professional 2003, everything is goin well until I receive error message 1402 indicating that I do not hav access to the registry key. I have tried everything imaginable t troubleshoot this problem to no avail. Help -- alici Posted from - http://www.officehelp.i Probably need more information like where is it being installed (local/remote), what operating system are you attempting to use, do you have appropriate priveleges, etc. al "alicia" <alicia.27d5er@NoSpamPleaze.com> wrote in message news:alicia.27d5er@NoSpamPleaze.com... > >...

Updating treeview control in form
I have an Access 2007 form that has a treeview ActiveX control that lists the dates and names of scheduled events. I have a popup form to edit and or delete an event. On the popup form there is a command button for saving any edits and a command button to delete a selected event. In both cases I need code to refresh the event list displayed in the treeview control of the event form after closing the popup form. I keep playing with refresh and requery methods but can't seem to figure it out. Any help will be greatly appreciated. Ken ...

Select Query to Open on Top of Form
I have a form [Grievance Tracking] that has a command button for a select query [GTS Audit]. When the user selects this button the query opens behind the form [Grievance Tracking]. Is there a way to have the query open on top of the form [Grievance Tracking] form instead of behind it? I'm using Access 2003. Thanks, -- Bob The problem is that the form PopUp Property set to yes, so every thing that you open will apear behind it. You can set it to No, and then the query will be on top of the form -- Good Luck BS"D "rdw1260@msn.com.(donotspam)" wrote: > I have a...

printing problems #9
I recently downloaded a trial version of Microsoft Publisher to see if I would be able to use it in my office to create templates. I created several templates that I liked but then was unable to print the trial version. Can trial publications be printed? If I click on the Print, Print Preview, Page Setup, or convert to PDF buttons, I get the message "To print or preview a publication, at least one printer must be installed on the system". I print from this computer every day from Microsoft Word, PowerPoint, and other programs without a problem. How do I install a printer ...

Margin printing problem
I'm trying to print a document and it keeps cutting off a tiny part of the right side of my document. I have equal margins on the right and left and it has no problem printing to the left side where it should. I'm not trying to print borderless. I have my layout guides at .27. I'm using an HP 1200 and my printer drivers are up to date. Am I just stuck here because of this printer?? Is there anything else I can try? Thanks. The HP site says you should be able to print within the margins you have specified. Open WordPad, file, page setup, input zero into each margin, ...

CRM 4 Web Access Problem
Hi, we have downloaded CRM 4 and installed it on our SBS 2003 Premium R2 Server. The installation completed successfully with no apparant errors but we cannot connect using the URL http://server:5555 - there is an error on the webpage: Line:194 Char:1 Error: Object Expected Code:0 URL: http://server:5555 Has anyone come across this problem and a fix? thanks. Did you try to access it from the server? Can you check your ASP.Net version under IIS? what version is it? Darren Liu, Microsoft CRM MVP Crowe http://www.crowecrm.com On Jan 8, 11:47=A0am, "Michael Brown" <st......

Rename PST file on Outlook 2002 Problem
Thanks Bravestar for your prompt response. But my problem is not how to call my personnal Foloder but when I rename them and I launch an auto-archive by using "file\Archive..." the system doesn't keep my customized names for those PST folders. NB: I'm using OL2002/SP3 and OS: Windows 2000 SP4. Thanks for any help! >-----Original Message----- >Hey Rob, > >please r-click on ur personal Folder. Properties, than on >the first rider more and after that you could change your >name there. >If you dont understand me please send me an email, i could >s...

Default Data Form
I have a basic worksheet for which I like to use the default data entr form. In other words it benefits from using a form but is just no worth a lot of custom form making. However while I do have an auto_open macro that moves to the first ne row in the range after all existing records, and then ends o ShowDataForm. But the default form always opens on the first record i the list. Is there a simple way to make the default form open on the row of th active cell, , instead of at the top of the list ? Thanks. Doug Lon -- Message posted from http://www.ExcelForum.com Maybe something li...

Client for Outlook Install problem
I am attempting to reinstall the Client for Outlook, as the original install was bugged. (For some reason the CRM Appointment screen would not load from the toolbar) Upon reinstalling and opening Outlook 2003, it tells me that there was an error loading the CRM forms. Additionally, by Event Log is referencing the COM+ Event System detecting a corrupt IEventSubscription object and has removed it. The timing seems to be related to the install itself. Any ideas on where to go from here? Thanks other than using a hammer, try uninstalling completly (ie uninstall CRM for Outlook, and S...

Problems setting up payroll entry
Just upgraded from money 2002 to money 2004. I tried to enter a payroll check in the bills/deposits section. When it asks for the accounts to which the money should be deposited there are no accounts in the pop down window to choose from even though I have accounts already set up. Anyone experience this? ...

Excel 97 Options Tab Problem
When I open Excel 97 click on tools -> Options it closes Excel. Is there a fix for this. I already tried deinstalling and reinstalling office 97 and I still get the same results. Maybe this is it: XL97: Page Fault or Violation When You Click Options on the Tools Menu http://support.microsoft.com/default.aspx?scid=kb;en-us;108032 sounds like it describes your Tools|Options problem (it says it was corrected in xl97 SR2). Chuck wrote: > > When I open Excel 97 click on tools -> Options it closes Excel. Is > there a fix for this. I already tried deinstalling and reins...

using controls in forms
Hoi, I want to check a form before sending, if two checkboxes are set. Can anyone help me Thankx Rudi ...

problem receiving emails #2
I use outlook 2003. Up til now it worked great. I changed to an other PC and now i got problems receiving mail. I see that outlook receives mail "1 of 4, 2 of 4 etc" but after it's finished I can not find it in my inbox. Where is it gone? Can anyone perhaps tell me what can be wrong? Checked al the settings but al seems OK. I can send Email without problems. -- cardin94 cardin94 wrote: > I use outlook 2003. Up til now it worked great. I changed to an other > PC and now i got problems receiving mail. I see that outlook > receives mail "1 of 4, 2 of 4 e...

Expose Problems Still Not Fixed?
I am still getting funny behavior form Microsoft Word 2008 running under Leopard and Expose. Sometimes when I try to click on a window in expose, it brings it to the front but the active window is still another Word window behind it. Then when I click on the window in front, it brings all the Word windows to the foreground (which is very frustrating when I'm trying to read something in Firefox and take notes in Word at the same time). I know there were problems with expose and Word when Office 2008 first came out but after at least 3 updates, has Microsoft really not addressed these issues...

Charting Problem in Excel 2010 #2
I have created a new file with attached line chart but I cannot seem to navigate to the proper screen where you add the vertical axis label AND chart title. Bill On Oct 24, 2:53=A0pm, Bill <jw.helb...@verizon.net> wrote: > I have created a new file with attached line chart but I cannot seem > to navigate to the proper screen where you add the vertical axis label > AND chart title. > > Bill Add axis titles manually 1.Click anywhere in the chart to which you want to add axis titles. This displays the Chart Tools, adding the Design, Layout, and Format tabs. 2.On the Lay...

import & export data on form
Is it possible for a form to autofill w/ data in table and when rest of form is filled out to export all data back into table? Ex: prefill form with: accounts dollars action When form completed: accounts accounts reviewed dollars dollars reviewed action action reviewed comments Ana, There must be a misunderstanding here. Forms don't *prefill* with data. In fact, forms don't have any data at all, tables do. Forms are bound to a table or a query, or maybe your form is unbound? So where/how is your form prefilling wit...