Open a form which contains a subform, such that the subform's fields are blank

King Kreglo

Registered User.
Local time
Today, 15:19
Joined
Aug 31, 2013
Messages
32
Hi there!

I have a [Order Central table] that compiles products from four different categories that employees can order from.

Employees using the database will select from four categories on buttons which opens up the order form EX: [Category 1 form].

They enter their order info on [Category 1 form] into a subform sourced from [Category 1 Table] called [Category 1 subform].

Is there a way that they could select the "Category 1" button, which would run a macro opening [Category 1 form] with the [Category 1 subform] having a where condition of 1=0 (or just so that the subform appears blank)?

Thanks in advance!!
 
Can you define what you mean by blank?

An empty control or one ready to accept input but with no existing records showing?
 
The latter of the two!
So that the cells are ready to accept entry but with no existing records showing.
 
Set the subform dataentry property to true - note that allow additions must also be true
 
Oh duh! Thanks CJ_London.

Is there a way that I could modify the dataentry property with the button?
Or should I just make a copy of my forms, one of each having Data Entry set to true and one of each having Data Entry set to false?
 
yes change names to suit:

Code:
Me.[COLOR=red]SubfromName[/COLOR].Form.DataEentry=true
 
Just tried it out and bumped into an issue:
I have 16 categories/subforms that to have data entry enabled so here's the procedure:
Me.subfrmCategory 1.Form.DataEntry=true
Me.subfrmCategory 2.Form.DataEntry=true
Me.subfrmCategory 3.Form.DataEntry=true
Me.subfrmCategory 4.Form.DataEntry=true
Me.subfrmCategory 5.Form.DataEntry=true
Me.subfrmCategory 6.Form.DataEntry=true
Me.subfrmCategory 7.Form.DataEntry=true
Me.subfrmCategory 8.Form.DataEntry=true
Me.subfrmCategory 9-16.Form.DataEntry=true

DoCmd.OpenForm (“frmFeatures Nav”)

About half of them highlight in red and read the error "Expected end of statment" after their form name, the other half work fine.
I tried placing brackets around the form names and it reads the message error:
"Run-timer error '2465': Microsoft Access can't find the field '|1' referred to in your expression."

Any ideas?
 

Users who are viewing this thread

Back
Top Bottom