Adding new records after opening a form with a switchboard

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a form in my database which draws its data from a query. When I open
the form from the database window, it opens in edit mode and allows me to
enter new data. So far, so good. However, when I open the same form from
the switchboard, with a command to open in add mode, then the "add records"
button is grey, and I cannot add new data. Can anybody think of what might
cause this?

Thanks.

sjkrause
 
It's simply a switchboard button. The "on click" property says
"=HandleButtonClick(3)". The relevant record in the switchboard table reads
Switchboard ID=2, Item number=3, Switchboard text=Open [formname] in add
mode, command=2, arguement=[formname]

Thanks.

sjkrause
 
If you open the query can you add data there? If not it's the query in
question not the form.

It's simply a switchboard button. The "on click" property says
"=HandleButtonClick(3)". The relevant record in the switchboard table reads
Switchboard ID=2, Item number=3, Switchboard text=Open [formname] in add
mode, command=2, arguement=[formname]

Thanks.

sjkrause

Penguin said:
Can you post the code used to open the form?
 
I can add records from the form, and also from the underlying query. It only
malfunctions when I open the form using the switchboard.


Penguin said:
If you open the query can you add data there? If not it's the query in
question not the form.

It's simply a switchboard button. The "on click" property says
"=HandleButtonClick(3)". The relevant record in the switchboard table reads
Switchboard ID=2, Item number=3, Switchboard text=Open [formname] in add
mode, command=2, arguement=[formname]

Thanks.

sjkrause

Penguin said:
Can you post the code used to open the form?

On Thu, 10 Feb 2005 15:19:05 -0800, "sjkrause"

I have a form in my database which draws its data from a query. When I open
the form from the database window, it opens in edit mode and allows me to
enter new data. So far, so good. However, when I open the same form from
the switchboard, with a command to open in add mode, then the "add records"
button is grey, and I cannot add new data. Can anybody think of what might
cause this?

Thanks.

sjkrause
 
I don't use the switchboard manager to code my buttons so I'm not sure
what the coding is doing. But if you code the button to this:

DoCmd OpenForm "MyForm"
DoCmd.RunCommand acCmdRecordsGoToNew

Does this work?

I can add records from the form, and also from the underlying query. It only
malfunctions when I open the form using the switchboard.


Penguin said:
If you open the query can you add data there? If not it's the query in
question not the form.

It's simply a switchboard button. The "on click" property says
"=HandleButtonClick(3)". The relevant record in the switchboard table reads
Switchboard ID=2, Item number=3, Switchboard text=Open [formname] in add
mode, command=2, arguement=[formname]

Thanks.

sjkrause

:

Can you post the code used to open the form?

On Thu, 10 Feb 2005 15:19:05 -0800, "sjkrause"

I have a form in my database which draws its data from a query. When I open
the form from the database window, it opens in edit mode and allows me to
enter new data. So far, so good. However, when I open the same form from
the switchboard, with a command to open in add mode, then the "add records"
button is grey, and I cannot add new data. Can anybody think of what might
cause this?

Thanks.

sjkrause
 
Thanks, it seems to be working ok now.

sjk

Penguin said:
I don't use the switchboard manager to code my buttons so I'm not sure
what the coding is doing. But if you code the button to this:

DoCmd OpenForm "MyForm"
DoCmd.RunCommand acCmdRecordsGoToNew

Does this work?

I can add records from the form, and also from the underlying query. It only
malfunctions when I open the form using the switchboard.


Penguin said:
If you open the query can you add data there? If not it's the query in
question not the form.

On Fri, 11 Feb 2005 06:59:03 -0800, "sjkrause"

It's simply a switchboard button. The "on click" property says
"=HandleButtonClick(3)". The relevant record in the switchboard table reads
Switchboard ID=2, Item number=3, Switchboard text=Open [formname] in add
mode, command=2, arguement=[formname]

Thanks.

sjkrause

:

Can you post the code used to open the form?

On Thu, 10 Feb 2005 15:19:05 -0800, "sjkrause"

I have a form in my database which draws its data from a query. When I open
the form from the database window, it opens in edit mode and allows me to
enter new data. So far, so good. However, when I open the same form from
the switchboard, with a command to open in add mode, then the "add records"
button is grey, and I cannot add new data. Can anybody think of what might
cause this?

Thanks.

sjkrause
 
Back
Top