Form not populating

P

Paul B.

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

------------------------
 
P

Paul B.

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.
 
R

Rick Brandt

Paul said:
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.
 
P

Paul B.

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.
 
R

Rick Brandt

Paul said:
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"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top