Form not populating

Hello all...

I have a edit record form, which was working, until I added record 
navigation buttons to the form (memberinfo) that has the edit record button 
that opens it.

I'm not sure where the problem is, but the eidt record form no longer 
populates the information. The filter shows the correct info, but the text 
boxes are all blank.

Here is the code for the edit record button on the memberinfo form.
--------------------------

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "EditMemberInfo"
    
    stLinkCriteria = "[MembershipNumber]=" & Me![MembershipNumber]
    
    DoCmd.OpenForm stDocName, , , stLinkCriteria

 ------------------------


0
Utf
2/3/2008 3:45:02 AM
access.formscoding 7493 articles. 0 followers. Follow

4 Replies
636 Views

Similar Articles

[PageSpeed] 12

Sorry, forgot the rest...

So, is this the best way to open a record to edit it? Should I run a query 
then open the editmemberinfo form based on the query?

Any advice would be appreciated.



"Paul B." wrote:

> Hello all...
> 
> I have a edit record form, which was working, until I added record 
> navigation buttons to the form (memberinfo) that has the edit record button 
> that opens it.
> 
> I'm not sure where the problem is, but the eidt record form no longer 
> populates the information. The filter shows the correct info, but the text 
> boxes are all blank.
> 
> Here is the code for the edit record button on the memberinfo form.
> --------------------------
> 
>     Dim stDocName As String
>     Dim stLinkCriteria As String
> 
>     stDocName = "EditMemberInfo"
>     
>     stLinkCriteria = "[MembershipNumber]=" & Me![MembershipNumber]
>     
>     DoCmd.OpenForm stDocName, , , stLinkCriteria
> 
>  ------------------------
> 
> 
0
Utf
2/3/2008 3:51:01 AM
Paul B. wrote:
> Sorry, forgot the rest...
>
> So, is this the best way to open a record to edit it? Should I run a
> query then open the editmemberinfo form based on the query?
>
> Any advice would be appreciated.

Adding navigation buttons has nothing at all to do with the opening of your 
other form.  Are you saying if you removed the navigation buttons the button 
would start working?  I just can't believe that.

What you are doing is fine and when the form that is opened appears blank it 
simply means that the filter you applied did not match any records.

-- 
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt   at   Hunter   dot   com


0
Rick
2/3/2008 4:01:27 AM
Hi Rick,

No, I don't think the nav buttons are the reason, I've done this before 
without any problems, but I am at a loss.

The Record Source is the correct table, and the filter is 
[MembershipNumber]=1 (which matches to the name entered in the search form) 
and this also point to a complete record. But the form still does not display 
the details.

Thanks.

 

"Rick Brandt" wrote:

> Paul B. wrote:
> > Sorry, forgot the rest...
> >
> > So, is this the best way to open a record to edit it? Should I run a
> > query then open the editmemberinfo form based on the query?
> >
> > Any advice would be appreciated.
> 
> Adding navigation buttons has nothing at all to do with the opening of your 
> other form.  Are you saying if you removed the navigation buttons the button 
> would start working?  I just can't believe that.
> 
> What you are doing is fine and when the form that is opened appears blank it 
> simply means that the filter you applied did not match any records.
> 
> -- 
> Rick Brandt, Microsoft Access MVP
> Email (as appropriate) to...
> RBrandt   at   Hunter   dot   com
> 
> 
> 
0
Utf
2/3/2008 4:29:01 AM
Paul B. wrote:
> Hi Rick,
>
> No, I don't think the nav buttons are the reason, I've done this
> before without any problems, but I am at a loss.
>
> The Record Source is the correct table, and the filter is
> [MembershipNumber]=1 (which matches to the name entered in the search
> form) and this also point to a complete record. But the form still
> does not display the details.

Are you sure MembershipNumber is actually a numeric DataType?  If it were text 
you would need...

[MembershipNumber] =  "1"

-- 
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt   at   Hunter   dot   com 


0
Rick
2/3/2008 4:45:03 AM
Reply:

Similar Artilces:

Creating a form for a Password
I have created a Password form that will secure another form. Once the password is entered it will open the form that has the list of reports. On the form I have a text box that accepts the user's password and I have 2 command buttons one is OK and the other is CANCEL. Can anyone tell me how to make these buttons work to open the form of reports? On Wed, 10 Oct 2007 13:52:00 -0700, mrsgwen wrote: > I have created a Password form that will secure another form. Once the > password is entered it will open the form that has the list of reports. On > the form I have a text b...

Adding data from one form to another
Working in MS Access 2003 I have one large table (Truck) that has at least four separate delivery addresses per record. (E.g. four fields, Deliver1, Delivery2, etc...)Also in this table are text fields that have special instructions such as on what days these addresses make deliveries. Theses days vary by address. I need to separate out these addresses into a single record in a new table (Location) and enter its delivery days. (Thus potentially, the one record in the Truck table will result in 4 records in the Location table) I have the master form (TruckForm) designed so that the truck num...

Report can't print form field
My report heading contains a text box with the following data source: ="Transactions since " & Forms!frmPrintTran!txtDate The on-screen preview shows the date fine, but on printing, this textbox displays #Name? The form remains open during print. Happens with both Access 2002 and 2007, DB structure A2000. What gives here? Thanks. -- TedMi This usually happens when there is code in the On Close of the report that closes the form. -- Duane Hookom Microsoft Access MVP "tedmi" wrote: > My report heading contains a text box with the following data source: > ...

Forms Check Box cell link
Excel 2003 I am using a check box created with the Forms menu. I created a box over cell D4. Using the Format Control box, I linked the check box to cell D4. I want to copy the check box in cell D5, D6, D7,.... and I want the cell link to integrate in the same mannor; check box in cell D5 should link to cell D5, and so on. Is there a way to accomplish this short of going into the format control box and manually editing each cell link after I have copy and pasted several check boxes? I have NOT entered the link using an absolute cell referense. I got the idea for this from Dav...

Customizing Forms Wizard
It is possible to control or customize details of the way the wizards creates objects? For instance, we have internal naming standards for controls and I would like the wizard to name each control according to our standard. I know I can use a form template for the forms created without wizards, but what about controlling the creation of the ones done via wizards too? Thanks in advance, See if this helps: http://support.microsoft.com/kb/151218/EN-US/ Román Valoria wrote: >It is possible to control or customize details of the way the wizards creates >objects? > >For ...

Form Menu : Check Box
I am trying to enter 300 or so check boxes onto and Excel spreadsheet. I find that I can link the 'return' cell using the right click / Forma Control / Control tab / Cell Link option but I need to do this for eac box ! Is there a way around this ? Whereby I can create one Check Box an then drag or copy it down -- jagstirlin ----------------------------------------------------------------------- jagstirling's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=110 View this thread: http://www.excelforum.com/showthread.php?threadid=50634 Maybe you could jus...

Access-Forms-VB links
After years in software development/database programming mostly on Unix/Oracle I'm tasked to change some Access forms to use redesigned tables. I'm having trouble with the relationship between forms and VB. For example I'm looking at some VB code that frequently references the Me class which I assume to be the default reference to the current (form) class (like this in C++), but I can't see how/where the class is actually defined. Can someone please provide some links that provide concise explanations of the relationship between Access and VB. My googling has only turned up pag...

can a form display current table field names?
Hello, I need to create a form that will display the current field names resulting from a make-table querythat can change from audit to audit. This way the user is always aware of the "current" field names in their dataset. Currently, a form displays the structure from a linked (text formt) table that I have to manually export every time the make-table query changes and I'd like this to be generated from a macro or from code. Any Ideas? I thank you, John_Lehmus Maine, USA This article illustrates how you can list the field names, types, and descriptions for a table: ...

Sinking MS Access form events from MFC console app
Hi All, I'm trying to sink MS Access form events using technique described in <<HOW TO: Handle Events for Excel by Using Visual C++ .NET (http://www.kbalertz.com/Q309301/Handle.Events.Excel.Using.Visual.aspx)>> Of course I did do all the needed code substitutions etc. All works rather well, I mean I'm getting to MS Access form IConnectionPointContainer etc. But the last code line - hr = m_pConnectionPoint->Advise(m_pAppEventListener,&m_dwConnectionCookie); doesn't work and returns hr = -2147220990. Here is MS Access form events interface ID I use: const II...

lists not populating userform
I got help with this code from Wouter. It worked great. Then I replaced variable and object names with less generic names that follow my standard naming schema. And lost the connection between the fields and the list boxes! Code now is: Private Sub cboCode_Change() Dim rCodes As Range cboFacilities.Clear For Each rCodes In Range("codeList").Cells If rCodes.Text = cboCode.Text Then cboFacilities.AddItem rCodes.Offset(0, 1).Text End If Next End Sub Private Sub usfFacilNameID_Activate() Dim rCodes As Range Dim iCodes As Integer Dim bCodes ...

Linking Form and Report
Good evening, I have a Main Entry Form for the entry of installation data. I have a Report set up to be used as an Audit tool. I would like to have the Audit Report pop up for review when the Save & Close button is depressed. The Form and the Report are linked by Folio No, unfortunately I have not been successful, when you push the Save & Close the form opens but its blank. I have checked the underlying tables and the data seems to be there. Is there something unusual about trying to attach a Report to a Form at all. Private Sub btnSaveRecord_Click() On Error GoTo Err_btnSa...

Passing Values between forms
I am trying to link to forms. I have a button on the main form (frmCompanies) that needs to open another form when a button is clicked. The new form that opens is frmScheduledActivities. When it open it needs to check to see if there is an existing record (scheduled activity) for the company and if there is no scheduled activity be set to add a new record. When the button is clicked on the main company form (on the on click event) this code runs: Private Sub cmdCallBack_Click() On Error GoTo Err_cmdCallBack_Click Dim stDocName As String Dim stLinkCriteria As String...

Display Query from form in Foreground
I have a form upon which the user selects display, filter and sort fields. He then clics the submit button and a query is built and then displayed with the following code: DoCmd.OpenQuery "Queryname", acNormal, acEdit The query works but shows up in the background and cant be clicked on until the form is closed. The idea was to create a form on which the user could do adhoc queries until he gets it right and then click another button to do the Excel extract. Is there a way to show the query in the foreground? On Tue, 22 Jan 2008 17:54:27 -0800, rmcompute wrote: > I ha...

Return Value from Form
I need to return a value from a form displayed modally. Many years ago, if I used VB classic, I could create a public method that took care of any arguments, displayed the form modally, and then returned appropriate return values. Something like this: Public Function GetValue(Args As Integer m_Args = Args m_Result = DefaultResult Show vbModal GetValue = m_Result End Function However, it appears Access VBA doesn't support this. For one thing, there's no Show method (and so it certainly can't have a modal argument). I like this approach because ...

User Form Security Question
Hi, I'm creating a form, which onces completed transfers the data over to the spreadsheet. But the guys in work don't really pay much attention to what they have entered , so i was wondering is there any way to make the user double check every entry? I was thinking, once the user clicks ok, a msgbox would appear giving the user the value they entered, click ok if correct or cancel to amend. Is there a easy way to do this? Cheers. -- harpscardiff ------------------------------------------------------------------------ harpscardiff's Profile: http://www.excelforum.com/mem...

I did do an update today form Microsofts update page #2
If I can remember correctly, it was 2 new items that came out today for the OS. Could that have casued this. But it worked Ok afterwards. Nothing else installed in the last week. ...

Entourage Calendar population of data from Address Book
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel Email Client: pop Entourage Forum, <br><br>Is there a simple way to have Entourage auto populate the Calendar with Birthday and Anniversary data from the Address Book? <br><br>Thanks in advance. On 2/21/10 11:16 AM, djgrasso@officeformac.com wrote: > Is there a simple way to have Entourage auto populate the Calendar with > Birthday and Anniversary data from the Address Book? No for blanket add, you have to add each contact's info from the contact window under the Perso...

How to I stop the form from resetting
I have a table linked to the header of my form. The table has for records. Here's what happens. When I choose a record (say record 3) record 1 ALWAYS prints. The form is meant to be printed out. Can someon please tell me how I can get the record I choose to print out? Thanks in advance!! :o) Although it is possible to print a form, it is not advised. You will get better results if you create a report and print the report. -- Dave Hargis, Microsoft Access MVP "Printing only filtered data in a form" wrote: > I have a table linked to the header of my form. The table h...

Pass Through query with criteria on a form
I have a Pass Through query that looks like this. select Location,City,State,Country,Pings from (select sd_term_name_loc as 'Location', sd_term_city as 'City', sd_term_st as 'State', sd_term_cntry as 'Country', count(sd_key)as 'Pings' from detail (nolock) where -- ***** The dates below refer to the date and time at which the transaction was loaded to PRM. -- ***** -- ***** The number of pings which have occurred BETWEEN those dates/times will be counted. -- ***** -- ***** Enter the date/time in the format '09/16/2007 14:00:00.000...

issue with serial port on module, updating form
Hello, Ive created a serial port instance on a module. In the same module I have the sub data_received. Now I'd like to update a control in a form, how can I do it? Thanks in advance You need to use Control.BeginInvoke or .Invoke to update the UI via a Delegate. You can download the VB2005 Terminal example from my website, which illustrates this. Dick -- Richard Grier, Consultant, Hard & Software 12962 West Louisiana Avenue Lakewood, CO 80228 303-986-2179 (voice) Homepage: www.hardandsoftware.net Author of Visual Basic Programmer's Guide to Serial Comm...

How can I put photos in Microsoft Access Form
I used the information BobLarson said in putting photos in Microsoft Access Form but it's not working. My computer keeps asking for Form1, which I deleted because nothing was happening the way I wanted it to. What I would like to know is there a online video that can show how you can do this procedure. And how can I get my computer stop asking for Form1. "Helen" <Helen@discussions.microsoft.com> wrote in message news:8E015B36-D605-428D-9275-C95DAC1DC3AE@microsoft.com... >I used the information BobLarson said in putting photos in Microsoft Access > For...

This form Requires Word
Thanks gang, I am reasonably up to snuff on Outlook and have used it for as long as it has been around. I am running Windows 2k Pro and Office 2k Pro and Outlook is configured to use Word as the default email editor. It does so quiet well both composing and reading email, except when email is receives from one particular person, one out of hundreds. This lady <the sender> is also using Outlook 2k pro and windows 2k pro and word as default editor. When I receive mail from her and try to open it I receive the message "This form requires Word as your email editor, but Word is eith...

Auto Population Of Names When Composing E-Mail
All - I have a wierd question...I have a user that is using Outlook 2003 and she sends a fair amount of email. I know that once you send a message to someone, Outlook "remembers" it so that if you send another message to them, all you have to do is start typing their name in the To box and it will show the name and email address. Her problem is that about once a month, she loses all of the names Outlook has "remembered". Anyone know why this would be happening and how to keep it from losing the remembered addresses? Thanks. Jeff If you head on over to the Sl...

Multiple Record Inputs with one Form
I'm programming with SQL and can't seem how to figure out how to send more than one record to the table with one form. You've described a "how" ... as in how you are trying to do something ("send more than one record to the table with one form"). Now, "why" ... as in what will having multiple records generated from a single form allow you to do (i.e., business need)? This isn't idle curiosity ... if we knew more about the underlying business need, we might be able to offer alternate approaches. Regards Jeff Boyce Microsoft Office/Access ...

Attaining Form for Excel
We are having some difficulty in attaining 'Forms' on Excel 2007. We have been directed to 'Down loads' and then attempt to down load 'Exel 2002 Add- in:Template Wizard with data Tracking. So far we have been unable to find any wizard after the down load. Please help -- thanks Griff Hi, what do you mean by "attaining form"? Please give a more complete description of what you are trying to do, disregarding the download of the wizard. -- If this helps, please click the Yes button. Cheers, Shane Devenshire "Griff" wrote: > We are having...