Re: Open Form

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



You need to check the set-up of the Form "OrderMain". What you posted does
not seem to be related to ability of the Form "OrderMain" to save Records or
not.

--
HTH
Van T. Dinh
MVP (Access)



"Johnny" <johnnyjamison@xxxxxxxxx> wrote in message
news:1130527615.923586.232270@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hi,
>
> I am trying to get into my code an expression syntax that when the from
> opens it clears the form for new data to be entered. In the line
> doCmd.OpenForm stDocName, , , stLinkCriteria at the end of this
> statement is where I wanted to add the acaddform syntax but when I do
> and open the form and fill in the data and then close and save it does
> not save the data. If I take the syntax out of the statement and open
> the form and enter the data and then close it saves the data for me. I
> am needing find the expression that will allow the data to be saved.
>
> Thanks
> Johnny
>
> Private Sub Command30_Click()
> On Error GoTo Err_Command30_Click
>
> Dim stDocName As String
> Dim stLinkCriteria As String
>
> stDocName = "OrderMain"
>
> stLinkCriteria = "[ContactID]=" & Me![ContactID]
> DoCmd.OpenForm stDocName, , , stLinkCriteria
>
> Exit_Command30_Click:
> Exit Sub
>
> Err_Command30_Click:
> MsgBox Err.Description
>


.



Relevant Pages

  • Open Form
    ... I am trying to get into my code an expression syntax that when the from ... opens it clears the form for new data to be entered. ... Dim stDocName As String ...
    (microsoft.public.access.gettingstarted)
  • Re: Using excel through vbscript
    ... > Set wkbk = oxl.activeworkbook ... >> format the text file into different col. ... >> If I open file the way you told me It simply opens the text file but it does ... >>> The correct syntax would be ...
    (microsoft.public.excel.programming)
  • Re: Function and Syntax problems
    ... The reason the syntax is in the format it is, ... On the form's Open or Load event ... What I need is when the accompanying form opens have the ID field on ...
    (microsoft.public.access.forms)
  • Re: Function and Syntax problems
    ... The reason the syntax is in the format it is, ... What I need is when the accompanying form opens have the ID field on the ... Why do you have 'acNormal' in the OpenArgs parameter in your OpenForm calls? ...
    (microsoft.public.access.forms)
  • Re: Number syntax
    ... It's expression syntax where it gets complicated. ... It begins with fractions and exponents being represented the wrong way: ... Principle of least surprise is a nice goal --- but sometimes you just can't avoid it other than by not letting people enter stuff in the first place that would unavoidably cause surprise later. ...
    (comp.arch.embedded)