go to function

D

Dona

Hi:

I'm using the "Issues" access 2007 template. I imported my data and am
modifying to make everything work with it. When I use my table for "Contacts"
the Go To function at the top of the form "Contact Details" no longer works.
I think it may be because the ID in the original was a number and mine is
text. When I try to modify the Row Source properties I still have my list of
ID information but it won't jump to the record. The row source is as follows:

SELECT [ID], [Contact Name], [Last Name], [Address] FROM [Contacts Extended]
WHERE [ID]<>Nz(Form![ID],0) ORDER BY [Contact Name];

I think this -- [ID]<>Nz(Form![ID],0 -- is the culprit but am unsure how to
change it to make it work. Everything I've tried achieves the same non-result.

Thanks for your help,
Dona
 
J

Jeff Boyce

Dona

Form![ID] refers to a form named "ID". What is the name of the field?

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
D

Dona

Hi Jeff:

Not sure how to answer your question. If you have 2 minutes do the following:
1. create Issues database from template
2. add a couple of records in contacts
3. test "Contact Details" form's Go To drop down box at the top--it should
work
4. delete relationships (it will give you an error if not, I have re-created
relationships in my database.)
5. change ID field from Autonumber to text
6. re-test "Contact Details" form's drop down box at the top. Thsi time it
should not work.
7. Then, you can find the info listed below in the properties of the Go To
dropdown box field.

Sounds like a lot, but it literally took me 2 minutes to re-create.

Thanks again for your help,
Dona



Jeff Boyce said:
Dona

Form![ID] refers to a form named "ID". What is the name of the field?

Regards

Jeff Boyce
Microsoft Office/Access MVP

Dona said:
Hi:

I'm using the "Issues" access 2007 template. I imported my data and am
modifying to make everything work with it. When I use my table for
"Contacts"
the Go To function at the top of the form "Contact Details" no longer
works.
I think it may be because the ID in the original was a number and mine is
text. When I try to modify the Row Source properties I still have my list
of
ID information but it won't jump to the record. The row source is as
follows:

SELECT [ID], [Contact Name], [Last Name], [Address] FROM [Contacts
Extended]
WHERE [ID]<>Nz(Form![ID],0) ORDER BY [Contact Name];

I think this -- [ID]<>Nz(Form![ID],0 -- is the culprit but am unsure how
to
change it to make it work. Everything I've tried achieves the same
non-result.

Thanks for your help,
Dona
 
J

Jeff Boyce

Dona

Take a look at "Expressions" in Access HELP.

To refer to a field on a form, you use something like:

Forms!FormName!ControlName

I'm not sure where you got the SQL statement you originally posted, but
something seems to be missing...

Regards

Jeff Boyce
Microsoft Office/Access MVP

Dona said:
Hi Jeff:

Not sure how to answer your question. If you have 2 minutes do the
following:
1. create Issues database from template
2. add a couple of records in contacts
3. test "Contact Details" form's Go To drop down box at the top--it should
work
4. delete relationships (it will give you an error if not, I have
re-created
relationships in my database.)
5. change ID field from Autonumber to text
6. re-test "Contact Details" form's drop down box at the top. Thsi time it
should not work.
7. Then, you can find the info listed below in the properties of the Go To
dropdown box field.

Sounds like a lot, but it literally took me 2 minutes to re-create.

Thanks again for your help,
Dona



Jeff Boyce said:
Dona

Form![ID] refers to a form named "ID". What is the name of the field?

Regards

Jeff Boyce
Microsoft Office/Access MVP

Dona said:
Hi:

I'm using the "Issues" access 2007 template. I imported my data and am
modifying to make everything work with it. When I use my table for
"Contacts"
the Go To function at the top of the form "Contact Details" no longer
works.
I think it may be because the ID in the original was a number and mine
is
text. When I try to modify the Row Source properties I still have my
list
of
ID information but it won't jump to the record. The row source is as
follows:

SELECT [ID], [Contact Name], [Last Name], [Address] FROM [Contacts
Extended]
WHERE [ID]<>Nz(Form![ID],0) ORDER BY [Contact Name];

I think this -- [ID]<>Nz(Form![ID],0 -- is the culprit but am unsure
how
to
change it to make it work. Everything I've tried achieves the same
non-result.

Thanks for your help,
Dona
 
D

Dona

Hi:

I've looked at help. Form! without a form name following it refers to a
subform. That's how far I have gotten. I didn't create this form and
therefore the chain of events doesn't work. It came with a template, worked
before I added my data and changed my ID type as listed below. I'm guessing
as to whether this is the culprit but it seems so in testing. Can you or
anyone help me? Two minutes of re-creating this on your computer may clear
this up.

Thanks,
Dona




Jeff Boyce said:
Dona

Take a look at "Expressions" in Access HELP.

To refer to a field on a form, you use something like:

Forms!FormName!ControlName

I'm not sure where you got the SQL statement you originally posted, but
something seems to be missing...

Regards

Jeff Boyce
Microsoft Office/Access MVP

Dona said:
Hi Jeff:

Not sure how to answer your question. If you have 2 minutes do the
following:
1. create Issues database from template
2. add a couple of records in contacts
3. test "Contact Details" form's Go To drop down box at the top--it should
work
4. delete relationships (it will give you an error if not, I have
re-created
relationships in my database.)
5. change ID field from Autonumber to text
6. re-test "Contact Details" form's drop down box at the top. Thsi time it
should not work.
7. Then, you can find the info listed below in the properties of the Go To
dropdown box field.

Sounds like a lot, but it literally took me 2 minutes to re-create.

Thanks again for your help,
Dona



Jeff Boyce said:
Dona

Form![ID] refers to a form named "ID". What is the name of the field?

Regards

Jeff Boyce
Microsoft Office/Access MVP

Hi:

I'm using the "Issues" access 2007 template. I imported my data and am
modifying to make everything work with it. When I use my table for
"Contacts"
the Go To function at the top of the form "Contact Details" no longer
works.
I think it may be because the ID in the original was a number and mine
is
text. When I try to modify the Row Source properties I still have my
list
of
ID information but it won't jump to the record. The row source is as
follows:

SELECT [ID], [Contact Name], [Last Name], [Address] FROM [Contacts
Extended]
WHERE [ID]<>Nz(Form![ID],0) ORDER BY [Contact Name];

I think this -- [ID]<>Nz(Form![ID],0 -- is the culprit but am unsure
how
to
change it to make it work. Everything I've tried achieves the same
non-result.

Thanks for your help,
Dona
 
J

Jeff Boyce

Before I spend the time trying to recreate something that doesn't work, let
me ask...

Why did you make the changes? Why not use the ID data type as given? What
will having a "text" data type for this ID allow you to do? I ask, not out
of curiosity, but because what you are trying to accomplish might be done a
different way, if we knew what you were trying to accomplish (rather than,
as you've described, "how" you are trying to do something...)

(And perhaps one of the other newsgroup readers has run across this and can
point a way out of your situation...)

Regards

Jeff Boyce
Microsoft Office/Access MVP

Dona said:
Hi:

I've looked at help. Form! without a form name following it refers to a
subform. That's how far I have gotten. I didn't create this form and
therefore the chain of events doesn't work. It came with a template,
worked
before I added my data and changed my ID type as listed below. I'm
guessing
as to whether this is the culprit but it seems so in testing. Can you or
anyone help me? Two minutes of re-creating this on your computer may clear
this up.

Thanks,
Dona




Jeff Boyce said:
Dona

Take a look at "Expressions" in Access HELP.

To refer to a field on a form, you use something like:

Forms!FormName!ControlName

I'm not sure where you got the SQL statement you originally posted, but
something seems to be missing...

Regards

Jeff Boyce
Microsoft Office/Access MVP

Dona said:
Hi Jeff:

Not sure how to answer your question. If you have 2 minutes do the
following:
1. create Issues database from template
2. add a couple of records in contacts
3. test "Contact Details" form's Go To drop down box at the top--it
should
work
4. delete relationships (it will give you an error if not, I have
re-created
relationships in my database.)
5. change ID field from Autonumber to text
6. re-test "Contact Details" form's drop down box at the top. Thsi time
it
should not work.
7. Then, you can find the info listed below in the properties of the Go
To
dropdown box field.

Sounds like a lot, but it literally took me 2 minutes to re-create.

Thanks again for your help,
Dona



:

Dona

Form![ID] refers to a form named "ID". What is the name of the field?

Regards

Jeff Boyce
Microsoft Office/Access MVP

Hi:

I'm using the "Issues" access 2007 template. I imported my data and
am
modifying to make everything work with it. When I use my table for
"Contacts"
the Go To function at the top of the form "Contact Details" no
longer
works.
I think it may be because the ID in the original was a number and
mine
is
text. When I try to modify the Row Source properties I still have my
list
of
ID information but it won't jump to the record. The row source is as
follows:

SELECT [ID], [Contact Name], [Last Name], [Address] FROM [Contacts
Extended]
WHERE [ID]<>Nz(Form![ID],0) ORDER BY [Contact Name];

I think this -- [ID]<>Nz(Form![ID],0 -- is the culprit but am unsure
how
to
change it to make it work. Everything I've tried achieves the same
non-result.

Thanks for your help,
Dona
 

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