Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form Opens Blank (No controls visible) 1

Status
Not open for further replies.

dragongunner0351

Programmer
Mar 16, 2006
104
US
Hello all I have a form that opens fine when viewing previous record entries. However when I open the form to create a new record it loads blank. Any ideas why? The form is opening based off of a command button control. One control is "View Previous Orders" (This control loads the form properly) the other control is "Create New Order" (This control loads a blank form)

Thanks in advance to any replies
 
What is the value of the AllowAdditions property of this form ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
How are ya dragongunner0351 . . .

Your probably setting the 5th argue of DoCmd.OpenForm to [blue]acFormAdd[/blue]:
Code:
[blue]      DoCmd.OpenForm "frmSchedule", acNormal, , , [purple][b]acFormAdd[/b][/purple][/blue]
[blue]acFormAdd[/blue] sets the [blue]Data Entry[/blue] property of the opened form to yes. It is this property thats giving you the single blank line as this is the function of [blue]Data Entry[/blue]. Its good for restricting users to [blue]data entry only![/blue]

If you have to see previous records you need something like:
Code:
[blue]   DoCmd.OpenForm "[purple][b][i]FormName[/i][/b][/purple]", acNormal
   DoEvents
   DoCmd.RunCommand acCmdRecordsGoToNew[/blue]
[blue]Your Thoughts? . . .[/blue]

Calvin.gif
See Ya! . . . . . .
 
I've tried all of your suggestions and nothing seems to be working. I'm going to look over some of the SQL and see if anything is messed up. If you have any other suggestions Im game.

Thanks
 
This is a little strange but, When the form loads blank and I click on the design button it takes me to the form in design view which is normal but when i return to form view it opens the form and shows all records attached to that customer.
 
Wonderful link AceMan! Thank you!

Let them hate - so long as they fear... Lucius Accius
 
Thanks for all the help. I found i had a criteria that wasn't jiving right with the two forms. I have since removed the criteria and now when i go to create a new order it opens the form and show all records for all customers.
Originally I wasn't trying to link by CustomerID which is a common field between the Orders Form and The Orders By Customer form.

For example,
Open Form Select company name from unbound drop down list.
Next you have two options
1. View all previous orders pertaining to this customer (not working anymore, since criteria was removed)
2. Click on command button to create new order.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top