trying to add data from a form to a table

Using Access 2007.  I have a reference to the following:
OLE Automation
Microsoft Office 12.0 Object Library
Microsoft ActiveX data Objects 2.8 Library.  

I’m trying to add data from a form to a table.  I’ve been experimenting with 
a few versions of this code for a few days now.  Still struggling.  :(

Private Sub Post_Click()
Dim err As Integer
Dim cnn1 As ADODB.Connection
Dim rstPatientTable As ADODB.Recordset
Dim strCnn As String
'Dim mydb As DAO.Database
Dim mydb As String

'if no errors insert data
If err < 1 Then
' Open a connection.
    Set cnn1 = New ADODB.Connection
   mydb = "C:\Pivot Trading System.accdb"
strCnn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & mydb
'On Error GoTo S:
    cnn1.Open strCnn

' Open contact table.
    Set rstcontact = New ADODB.Recordset
    rstcontact.CursorType = adOpenKeyset
    rstcontact.LockType = adLockOptimistic
    rstcontact.Open "Options", cnn1, , , adCmdTable

'get the new record data
rstcontact.AddNew
        'rstcontact!OptionsNo = OptionsNo
        rstcontact!TicketNo = TicketNo
        rstcontact!Side = Side
        rstcontact!Symbol = Symbol
        rstcontact!Quantity = Quantity
        rstcontact!Strike = Strike
        rstcontact!Call_Put = Call_Put
        rstcontact!Price = Price
        rstcontact!Exchange = Exchange
        rstcontact!Approved = Approved
        rstcontact!DateAdd = Now()
        rstcontact.Update
' Show the newly added data.
MsgBox "New Post: " & rstcontact!TicketNo & " " & rstcontact!Symbol & " has 
been successfully added"
'close connections
rstcontact.Close

Else
MsgBox "An Error has occurred, please check and try again"
End If

End Sub

Code errors here:
cnn1.Open strCnn

Error message is:
Unrecognized database format ‘C:\Pivot Trading System.accdb’

I never had any errors with this code in Access 2003.  Now, in 2007, nothing 
but errors.

Any ideas?

Thanks!
Ryan--- 

0
Utf
1/5/2010 11:17:01 PM
access.modulesdaovba 1670 articles. 0 followers. Follow

8 Replies
1316 Views

Similar Articles

[PageSpeed] 49

If the FORM is BOUND to the table and the CONTROLS are bound, YOU DO NOT 
NEED TO HANDLE INSERTING THE DATA. Access will handle that itself. At this 
point I would *highly* recommend that you pick up a book about Access as 
this is a very basic concept.

If you have any questions, please refer back to the your original post a few 
days ago.


"RyGuy" <RyGuy@discussions.microsoft.com> wrote in message 
news:9CE14540-73CC-4CFA-9591-C4E9A1BCE8BE@microsoft.com...
> Using Access 2007.  I have a reference to the following:
> OLE Automation
> Microsoft Office 12.0 Object Library
> Microsoft ActiveX data Objects 2.8 Library.
>
> I'm trying to add data from a form to a table.  I've been experimenting 
> with
> a few versions of this code for a few days now.  Still struggling.  :(
>
> Private Sub Post_Click()
> Dim err As Integer
> Dim cnn1 As ADODB.Connection
> Dim rstPatientTable As ADODB.Recordset
> Dim strCnn As String
> 'Dim mydb As DAO.Database
> Dim mydb As String
>
> 'if no errors insert data
> If err < 1 Then
> ' Open a connection.
>    Set cnn1 = New ADODB.Connection
>   mydb = "C:\Pivot Trading System.accdb"
> strCnn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & mydb
> 'On Error GoTo S:
>    cnn1.Open strCnn
>
> ' Open contact table.
>    Set rstcontact = New ADODB.Recordset
>    rstcontact.CursorType = adOpenKeyset
>    rstcontact.LockType = adLockOptimistic
>    rstcontact.Open "Options", cnn1, , , adCmdTable
>
> 'get the new record data
> rstcontact.AddNew
>        'rstcontact!OptionsNo = OptionsNo
>        rstcontact!TicketNo = TicketNo
>        rstcontact!Side = Side
>        rstcontact!Symbol = Symbol
>        rstcontact!Quantity = Quantity
>        rstcontact!Strike = Strike
>        rstcontact!Call_Put = Call_Put
>        rstcontact!Price = Price
>        rstcontact!Exchange = Exchange
>        rstcontact!Approved = Approved
>        rstcontact!DateAdd = Now()
>        rstcontact.Update
> ' Show the newly added data.
> MsgBox "New Post: " & rstcontact!TicketNo & " " & rstcontact!Symbol & " 
> has
> been successfully added"
> 'close connections
> rstcontact.Close
>
> Else
> MsgBox "An Error has occurred, please check and try again"
> End If
>
> End Sub
>
> Code errors here:
> cnn1.Open strCnn
>
> Error message is:
> Unrecognized database format 'C:\Pivot Trading System.accdb'
>
> I never had any errors with this code in Access 2003.  Now, in 2007, 
> nothing
> but errors.
>
> Any ideas?
>
> Thanks!
> Ryan--- 
> 


0
David
1/5/2010 11:40:36 PM
Yes, the fields are bound to the table.  I think this is going to require an 
Update Query.  The thing is this...I have two sub-forms embedded in a form, 
and you can toggle back and forth between these two sub-forms by clicking the 
tabs at the top (insert page & delete page).  One sub-form is called 
'Options' and the other sub-form is called 'Stocks'.  So what I want to do, 
ultimately, is make sure all fields on both sub-forms are filled in, and then 
click a button to send the data from BOTH tabs to the respective 
tables...probably with an Update Query.

I have created a query that combines the records from both tables.  Should I 
link the form to this new query?  I have 100 records in the Options table and 
25 in the Stocks table (I created a join where all records from the Options 
table AND all records from the Stocks table are included – query has 100 
records displayed).  I'm not sure how to tell Access to update the correct 
records!!  There seems to be a major disconnect between what I'm trying to do 
and what I'm actually able to do here!!

I've worked with Update Queries quite a bit in the past, but it was just a 
Query updating records in a table, and all I did was call the Update Query 
with some simple VBA.  I have never developed a form to control an Update 
Query to pass records from the form to a table.

Are there are good resources online that describe how to do this?  I've read 
many Access books and don't recall every reading anything about this.  
Nevertheless, I think it can be done.  I know these discussion groups are 
great for learning things wayyy beyond what you will ever learn from a book, 
because no book can possibly cover every topic.

Thanks for everything!
Ryan—


-- 
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"David C. Holley" wrote:

> If the FORM is BOUND to the table and the CONTROLS are bound, YOU DO NOT 
> NEED TO HANDLE INSERTING THE DATA. Access will handle that itself. At this 
> point I would *highly* recommend that you pick up a book about Access as 
> this is a very basic concept.
> 
> If you have any questions, please refer back to the your original post a few 
> days ago.
> 
> 
> "RyGuy" <RyGuy@discussions.microsoft.com> wrote in message 
> news:9CE14540-73CC-4CFA-9591-C4E9A1BCE8BE@microsoft.com...
> > Using Access 2007.  I have a reference to the following:
> > OLE Automation
> > Microsoft Office 12.0 Object Library
> > Microsoft ActiveX data Objects 2.8 Library.
> >
> > I'm trying to add data from a form to a table.  I've been experimenting 
> > with
> > a few versions of this code for a few days now.  Still struggling.  :(
> >
> > Private Sub Post_Click()
> > Dim err As Integer
> > Dim cnn1 As ADODB.Connection
> > Dim rstPatientTable As ADODB.Recordset
> > Dim strCnn As String
> > 'Dim mydb As DAO.Database
> > Dim mydb As String
> >
> > 'if no errors insert data
> > If err < 1 Then
> > ' Open a connection.
> >    Set cnn1 = New ADODB.Connection
> >   mydb = "C:\Pivot Trading System.accdb"
> > strCnn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & mydb
> > 'On Error GoTo S:
> >    cnn1.Open strCnn
> >
> > ' Open contact table.
> >    Set rstcontact = New ADODB.Recordset
> >    rstcontact.CursorType = adOpenKeyset
> >    rstcontact.LockType = adLockOptimistic
> >    rstcontact.Open "Options", cnn1, , , adCmdTable
> >
> > 'get the new record data
> > rstcontact.AddNew
> >        'rstcontact!OptionsNo = OptionsNo
> >        rstcontact!TicketNo = TicketNo
> >        rstcontact!Side = Side
> >        rstcontact!Symbol = Symbol
> >        rstcontact!Quantity = Quantity
> >        rstcontact!Strike = Strike
> >        rstcontact!Call_Put = Call_Put
> >        rstcontact!Price = Price
> >        rstcontact!Exchange = Exchange
> >        rstcontact!Approved = Approved
> >        rstcontact!DateAdd = Now()
> >        rstcontact.Update
> > ' Show the newly added data.
> > MsgBox "New Post: " & rstcontact!TicketNo & " " & rstcontact!Symbol & " 
> > has
> > been successfully added"
> > 'close connections
> > rstcontact.Close
> >
> > Else
> > MsgBox "An Error has occurred, please check and try again"
> > End If
> >
> > End Sub
> >
> > Code errors here:
> > cnn1.Open strCnn
> >
> > Error message is:
> > Unrecognized database format 'C:\Pivot Trading System.accdb'
> >
> > I never had any errors with this code in Access 2003.  Now, in 2007, 
> > nothing
> > but errors.
> >
> > Any ideas?
> >
> > Thanks!
> > Ryan--- 
> > 
> 
> 
> .
> 
0
Utf
1/7/2010 5:56:01 PM
Can you post the recordsource's for each subform as well as the main form? 
The SQL statement displayed in the .RecordSource property field for the form 
and each of the sub forms.

"ryguy7272" <ryguy7272@discussions.microsoft.com> wrote in message 
news:402326B5-2BFD-42B4-AAA4-283529DC17D9@microsoft.com...
> Yes, the fields are bound to the table.  I think this is going to require 
> an
> Update Query.  The thing is this...I have two sub-forms embedded in a 
> form,
> and you can toggle back and forth between these two sub-forms by clicking 
> the
> tabs at the top (insert page & delete page).  One sub-form is called
> 'Options' and the other sub-form is called 'Stocks'.  So what I want to 
> do,
> ultimately, is make sure all fields on both sub-forms are filled in, and 
> then
> click a button to send the data from BOTH tabs to the respective
> tables...probably with an Update Query.
>
> I have created a query that combines the records from both tables.  Should 
> I
> link the form to this new query?  I have 100 records in the Options table 
> and
> 25 in the Stocks table (I created a join where all records from the 
> Options
> table AND all records from the Stocks table are included - query has 100
> records displayed).  I'm not sure how to tell Access to update the correct
> records!!  There seems to be a major disconnect between what I'm trying to 
> do
> and what I'm actually able to do here!!
>
> I've worked with Update Queries quite a bit in the past, but it was just a
> Query updating records in a table, and all I did was call the Update Query
> with some simple VBA.  I have never developed a form to control an Update
> Query to pass records from the form to a table.
>
> Are there are good resources online that describe how to do this?  I've 
> read
> many Access books and don't recall every reading anything about this.
> Nevertheless, I think it can be done.  I know these discussion groups are
> great for learning things wayyy beyond what you will ever learn from a 
> book,
> because no book can possibly cover every topic.
>
> Thanks for everything!
> Ryan-
>
>
> -- 
> Ryan---
> If this information was helpful, please indicate this by clicking ''Yes''.
>
>
> "David C. Holley" wrote:
>
>> If the FORM is BOUND to the table and the CONTROLS are bound, YOU DO NOT
>> NEED TO HANDLE INSERTING THE DATA. Access will handle that itself. At 
>> this
>> point I would *highly* recommend that you pick up a book about Access as
>> this is a very basic concept.
>>
>> If you have any questions, please refer back to the your original post a 
>> few
>> days ago.
>>
>>
>> "RyGuy" <RyGuy@discussions.microsoft.com> wrote in message
>> news:9CE14540-73CC-4CFA-9591-C4E9A1BCE8BE@microsoft.com...
>> > Using Access 2007.  I have a reference to the following:
>> > OLE Automation
>> > Microsoft Office 12.0 Object Library
>> > Microsoft ActiveX data Objects 2.8 Library.
>> >
>> > I'm trying to add data from a form to a table.  I've been experimenting
>> > with
>> > a few versions of this code for a few days now.  Still struggling.  :(
>> >
>> > Private Sub Post_Click()
>> > Dim err As Integer
>> > Dim cnn1 As ADODB.Connection
>> > Dim rstPatientTable As ADODB.Recordset
>> > Dim strCnn As String
>> > 'Dim mydb As DAO.Database
>> > Dim mydb As String
>> >
>> > 'if no errors insert data
>> > If err < 1 Then
>> > ' Open a connection.
>> >    Set cnn1 = New ADODB.Connection
>> >   mydb = "C:\Pivot Trading System.accdb"
>> > strCnn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & mydb
>> > 'On Error GoTo S:
>> >    cnn1.Open strCnn
>> >
>> > ' Open contact table.
>> >    Set rstcontact = New ADODB.Recordset
>> >    rstcontact.CursorType = adOpenKeyset
>> >    rstcontact.LockType = adLockOptimistic
>> >    rstcontact.Open "Options", cnn1, , , adCmdTable
>> >
>> > 'get the new record data
>> > rstcontact.AddNew
>> >        'rstcontact!OptionsNo = OptionsNo
>> >        rstcontact!TicketNo = TicketNo
>> >        rstcontact!Side = Side
>> >        rstcontact!Symbol = Symbol
>> >        rstcontact!Quantity = Quantity
>> >        rstcontact!Strike = Strike
>> >        rstcontact!Call_Put = Call_Put
>> >        rstcontact!Price = Price
>> >        rstcontact!Exchange = Exchange
>> >        rstcontact!Approved = Approved
>> >        rstcontact!DateAdd = Now()
>> >        rstcontact.Update
>> > ' Show the newly added data.
>> > MsgBox "New Post: " & rstcontact!TicketNo & " " & rstcontact!Symbol & "
>> > has
>> > been successfully added"
>> > 'close connections
>> > rstcontact.Close
>> >
>> > Else
>> > MsgBox "An Error has occurred, please check and try again"
>> > End If
>> >
>> > End Sub
>> >
>> > Code errors here:
>> > cnn1.Open strCnn
>> >
>> > Error message is:
>> > Unrecognized database format 'C:\Pivot Trading System.accdb'
>> >
>> > I never had any errors with this code in Access 2003.  Now, in 2007,
>> > nothing
>> > but errors.
>> >
>> > Any ideas?
>> >
>> > Thanks!
>> > Ryan--- 
>> >
>>
>>
>> .
>> 


0
David
1/7/2010 6:28:42 PM
I don't understand.  What do you mean recordsource?  Under ControlSource each 
TextBox is bound to the table.  I see properties there, but I don't know how 
to get all .RecordSource property fields.  Is there some kind of macro, or 
VBA, to get all .RecordSource property fields?

Thsanks for everything!
Ryan--

-- 
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"David C. Holley" wrote:

> Can you post the recordsource's for each subform as well as the main form? 
> The SQL statement displayed in the .RecordSource property field for the form 
> and each of the sub forms.
> 
> "ryguy7272" <ryguy7272@discussions.microsoft.com> wrote in message 
> news:402326B5-2BFD-42B4-AAA4-283529DC17D9@microsoft.com...
> > Yes, the fields are bound to the table.  I think this is going to require 
> > an
> > Update Query.  The thing is this...I have two sub-forms embedded in a 
> > form,
> > and you can toggle back and forth between these two sub-forms by clicking 
> > the
> > tabs at the top (insert page & delete page).  One sub-form is called
> > 'Options' and the other sub-form is called 'Stocks'.  So what I want to 
> > do,
> > ultimately, is make sure all fields on both sub-forms are filled in, and 
> > then
> > click a button to send the data from BOTH tabs to the respective
> > tables...probably with an Update Query.
> >
> > I have created a query that combines the records from both tables.  Should 
> > I
> > link the form to this new query?  I have 100 records in the Options table 
> > and
> > 25 in the Stocks table (I created a join where all records from the 
> > Options
> > table AND all records from the Stocks table are included - query has 100
> > records displayed).  I'm not sure how to tell Access to update the correct
> > records!!  There seems to be a major disconnect between what I'm trying to 
> > do
> > and what I'm actually able to do here!!
> >
> > I've worked with Update Queries quite a bit in the past, but it was just a
> > Query updating records in a table, and all I did was call the Update Query
> > with some simple VBA.  I have never developed a form to control an Update
> > Query to pass records from the form to a table.
> >
> > Are there are good resources online that describe how to do this?  I've 
> > read
> > many Access books and don't recall every reading anything about this.
> > Nevertheless, I think it can be done.  I know these discussion groups are
> > great for learning things wayyy beyond what you will ever learn from a 
> > book,
> > because no book can possibly cover every topic.
> >
> > Thanks for everything!
> > Ryan-
> >
> >
> > -- 
> > Ryan---
> > If this information was helpful, please indicate this by clicking ''Yes''.
> >
> >
> > "David C. Holley" wrote:
> >
> >> If the FORM is BOUND to the table and the CONTROLS are bound, YOU DO NOT
> >> NEED TO HANDLE INSERTING THE DATA. Access will handle that itself. At 
> >> this
> >> point I would *highly* recommend that you pick up a book about Access as
> >> this is a very basic concept.
> >>
> >> If you have any questions, please refer back to the your original post a 
> >> few
> >> days ago.
> >>
> >>
> >> "RyGuy" <RyGuy@discussions.microsoft.com> wrote in message
> >> news:9CE14540-73CC-4CFA-9591-C4E9A1BCE8BE@microsoft.com...
> >> > Using Access 2007.  I have a reference to the following:
> >> > OLE Automation
> >> > Microsoft Office 12.0 Object Library
> >> > Microsoft ActiveX data Objects 2.8 Library.
> >> >
> >> > I'm trying to add data from a form to a table.  I've been experimenting
> >> > with
> >> > a few versions of this code for a few days now.  Still struggling.  :(
> >> >
> >> > Private Sub Post_Click()
> >> > Dim err As Integer
> >> > Dim cnn1 As ADODB.Connection
> >> > Dim rstPatientTable As ADODB.Recordset
> >> > Dim strCnn As String
> >> > 'Dim mydb As DAO.Database
> >> > Dim mydb As String
> >> >
> >> > 'if no errors insert data
> >> > If err < 1 Then
> >> > ' Open a connection.
> >> >    Set cnn1 = New ADODB.Connection
> >> >   mydb = "C:\Pivot Trading System.accdb"
> >> > strCnn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & mydb
> >> > 'On Error GoTo S:
> >> >    cnn1.Open strCnn
> >> >
> >> > ' Open contact table.
> >> >    Set rstcontact = New ADODB.Recordset
> >> >    rstcontact.CursorType = adOpenKeyset
> >> >    rstcontact.LockType = adLockOptimistic
> >> >    rstcontact.Open "Options", cnn1, , , adCmdTable
> >> >
> >> > 'get the new record data
> >> > rstcontact.AddNew
> >> >        'rstcontact!OptionsNo = OptionsNo
> >> >        rstcontact!TicketNo = TicketNo
> >> >        rstcontact!Side = Side
> >> >        rstcontact!Symbol = Symbol
> >> >        rstcontact!Quantity = Quantity
> >> >        rstcontact!Strike = Strike
> >> >        rstcontact!Call_Put = Call_Put
> >> >        rstcontact!Price = Price
> >> >        rstcontact!Exchange = Exchange
> >> >        rstcontact!Approved = Approved
> >> >        rstcontact!DateAdd = Now()
> >> >        rstcontact.Update
> >> > ' Show the newly added data.
> >> > MsgBox "New Post: " & rstcontact!TicketNo & " " & rstcontact!Symbol & "
> >> > has
> >> > been successfully added"
> >> > 'close connections
> >> > rstcontact.Close
> >> >
> >> > Else
> >> > MsgBox "An Error has occurred, please check and try again"
> >> > End If
> >> >
> >> > End Sub
> >> >
> >> > Code errors here:
> >> > cnn1.Open strCnn
> >> >
> >> > Error message is:
> >> > Unrecognized database format 'C:\Pivot Trading System.accdb'
> >> >
> >> > I never had any errors with this code in Access 2003.  Now, in 2007,
> >> > nothing
> >> > but errors.
> >> >
> >> > Any ideas?
> >> >
> >> > Thanks!
> >> > Ryan--- 
> >> >
> >>
> >>
> >> .
> >> 
> 
> 
> .
> 
0
Utf
1/7/2010 8:10:02 PM
On Thu, 7 Jan 2010 12:10:02 -0800, ryguy7272
<ryguy7272@discussions.microsoft.com> wrote:

>I don't understand.  What do you mean recordsource?  Under ControlSource each 
>TextBox is bound to the table.  I see properties there, but I don't know how 
>to get all .RecordSource property fields.  Is there some kind of macro, or 
>VBA, to get all .RecordSource property fields?

The *FORM ITSELF* has properties (not just the controls on the form).

To see them click the little square at the upper left intersection of the
rulers and select Properties. The Recordsource of the form is the name of the
table, of the query, or the SQL string of an ad-hoc query which provides the
data for the form.
-- 

             John W. Vinson [MVP]
0
John
1/7/2010 11:55:56 PM
Ah!  Now it's starting to make sense.  Here is the Record Source, which is 
the SQL:
SELECT Trades.CUSTOMER, Trades.ContraTrader, Trades.[Entered  By], 
Trades.[Open/Close], Trades.RR, Trades.Broker_Solicit_From, Trades.[Solicited 
From], Trades.ExecBroker, Trades.OrderType, Trades.RateBi_Pass, 
Trades.Adjusted_Cust_Rate, Trades.FeeBi_Pass, Trades.Adjusted_Brk_Fee, 
Trades.Notes, Trades.Post, Trades.TradeDate, Trades.TicketNo
FROM Trades;


-- 
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"John W. Vinson" wrote:

> On Thu, 7 Jan 2010 12:10:02 -0800, ryguy7272
> <ryguy7272@discussions.microsoft.com> wrote:
> 
> >I don't understand.  What do you mean recordsource?  Under ControlSource each 
> >TextBox is bound to the table.  I see properties there, but I don't know how 
> >to get all .RecordSource property fields.  Is there some kind of macro, or 
> >VBA, to get all .RecordSource property fields?
> 
> The *FORM ITSELF* has properties (not just the controls on the form).
> 
> To see them click the little square at the upper left intersection of the
> rulers and select Properties. The Recordsource of the form is the name of the
> table, of the query, or the SQL string of an ad-hoc query which provides the
> data for the form.
> -- 
> 
>              John W. Vinson [MVP]
> .
> 
0
Utf
1/8/2010 5:11:01 AM
On Thu, 7 Jan 2010 21:11:01 -0800, ryguy7272
<ryguy7272@discussions.microsoft.com> wrote:

>Ah!  Now it's starting to make sense.  Here is the Record Source, which is 
>the SQL:
>SELECT Trades.CUSTOMER, Trades.ContraTrader, Trades.[Entered  By], 
>Trades.[Open/Close], Trades.RR, Trades.Broker_Solicit_From, Trades.[Solicited 
>From], Trades.ExecBroker, Trades.OrderType, Trades.RateBi_Pass, 
>Trades.Adjusted_Cust_Rate, Trades.FeeBi_Pass, Trades.Adjusted_Brk_Fee, 
>Trades.Notes, Trades.Post, Trades.TradeDate, Trades.TicketNo
>FROM Trades;

If this is the recordsource for the subform then...

Entering data into any of the controls bound to these fields and doing
anything to move off the subform (moving to the mainform, to the other
subform, closing the form, hitting Shift-Enter, etc.) will automatically and
silently write those values into the table Trades.

No code is needed.

No query is needed.

No Append is needed.

That's what bound forms are FOR - you type into the form, Access stores it in
the table for you. No muss, no fuss!
-- 

             John W. Vinson [MVP]
0
John
1/10/2010 6:17:55 AM
Sorry for being so thick John!! You are totally right.  I've never done it 
that way before.  My experience with forms is somewhat limited.  In the past, 
I have used Access mostly for queries (and then exporting results to Excel) 
and reports.

Thanks for showing me how this feature works!!

Ryan--

-- 
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"John W. Vinson" wrote:

> On Thu, 7 Jan 2010 21:11:01 -0800, ryguy7272
> <ryguy7272@discussions.microsoft.com> wrote:
> 
> >Ah!  Now it's starting to make sense.  Here is the Record Source, which is 
> >the SQL:
> >SELECT Trades.CUSTOMER, Trades.ContraTrader, Trades.[Entered  By], 
> >Trades.[Open/Close], Trades.RR, Trades.Broker_Solicit_From, Trades.[Solicited 
> >From], Trades.ExecBroker, Trades.OrderType, Trades.RateBi_Pass, 
> >Trades.Adjusted_Cust_Rate, Trades.FeeBi_Pass, Trades.Adjusted_Brk_Fee, 
> >Trades.Notes, Trades.Post, Trades.TradeDate, Trades.TicketNo
> >FROM Trades;
> 
> If this is the recordsource for the subform then...
> 
> Entering data into any of the controls bound to these fields and doing
> anything to move off the subform (moving to the mainform, to the other
> subform, closing the form, hitting Shift-Enter, etc.) will automatically and
> silently write those values into the table Trades.
> 
> No code is needed.
> 
> No query is needed.
> 
> No Append is needed.
> 
> That's what bound forms are FOR - you type into the form, Access stores it in
> the table for you. No muss, no fuss!
> -- 
> 
>              John W. Vinson [MVP]
> .
> 
0
Utf
1/12/2010 7:17:02 PM
Reply:

Similar Artilces:

Changing the field names of linked table
I have an ODBC link to some live data. Unfortunately the field names for this data are just codes and aren't very helpful. Though I have made a table in access which links the codes to the actual description. I need a way to create a new table which has all the data from the ODBC link but for the field names it uses the field description rather than the field code. Can someone help? Sanchez wrote: > I have an ODBC link to some live data. > > Unfortunately the field names for this data are just codes and aren't > very helpful. > > Though I have made a table in...

Data Consolidation Problems in using wild cards in range names
I am using Excel 2003. I am not able to use wild cards in naming data ranges in the data consolidation dialog box. It gives the response as 'Wrong Reference'. How to use the wild cards ? and *. ...

Add Mailbox Error
Error trying to add a mailbox Exchange 5.5 Outlook 2000 When trying to add a mailbox (Right Click Mailbox > Properties > Advanced button > Advanced tab > Add button) we get this generic message: "The name could not be resolved. The action could not be completed" I was assuming it was a permissions issue and added Authenticated Users the Search right to the Server in Exchange Manager. However the issue still exists. Clicking the “Add” button immediately produces the error message. The Add Mailbox window never appears. Hi Joe First of all, that's an outlook...

Purchase Requisition Form
Before we can put in a Purchase Order in GP, we have to first fill out and get approved a "Purchase Order Requisition form". The workflow would be that somebody completes the PO Req form to buy a "copier" for eg. , and then he sends it over via email to his boss. Who then accepts it or rejects it. If it is accepted it to goes to finance and they write a chck. If rejected in will be squashed. If anybody has done this..please share your ideas. We had it working using forms in Outlook 2003 but now we upgraded to 2007 and the forms no longer works for us and the original...

trying this out
This is a test posting. On Tue, 13 Nov 2007 16:06:51 +0800, "hmmmm" <bobo123@dotdot.dyndns.org> wrote: >This is a test posting. > Please use microsoft.public.test or microsoft.public.test.here for your testing. This is a working newsgroup. If you have questions about an Access database, please post them. John W. Vinson [MVP] ...

Need to compare 2 tables and only pull certain records from one ta
I have a monthly sales file that contains several invoices that allows duplicate records of parts. My second table is a different sales file that also contains several invoices and allows duplicate records. I want to match from the second table as a basis. How do I pull matching invoices from the two tables without pulling all the data from the first monthly sales file? UNTESTED UNTESTED SELECT SecondTable.* FROM SecondTable INNER JOIN FirstTable ON SecondTable[Invoices] = (SELECT FirstTable.[Invoices] FROM FirstTable GROUP BY FirstTable.[Invoices]) ORDER BY SecondT...

Cannot add extra mailboxes
Hi Newsgroup. I have a problem with some of my Outlook 2002 clients. When I go to edit the properties for my exchange server,=20 =FAnder Advenced I can choose to add other mailboxes, but=20 when I push the ADD button, it comes with an error. It says: The name cannot be found, I can't even type=20 anything, it just gives this error. (This is a translation from Danish) Anyone how can fix this ? What version of Exchange? If 5.5 you need to create the users as Windows accounts first before you create a new mailbox, if 2000 or later you need to use the ADUC to add the users to the AD before ...

Graph intra-day stock data
How do you graph intra day data (Date, Open, High, Low, Close) format. Where the Date includes the time: (2/22/04 9:00 AM format). Currently, I get a chart with all the individual 30 min bars being grouped into just a daily bar, I would like individual bars for each half hour. The easiest way would be to use a XY Scatter chart, rather than a Line chart. -- Regards, Tushar Mehta, MS MVP -- Excel www.tushar-mehta.com Excel, PowerPoint, and VBA add-ins, tutorials Custom MS Office productivity solutions In article <106ea01c3f3b9$e560c6d0$a001280a@phx.gbl>, anonymous@discussions.mi...

OWA Issues with Forms
I have added another Exchange Cluster to my enviroment. We have forms enabled on the OWA servers and everything works fine on the original virtual server. For mailboxes on the new virtual server, the forms login page appears but when it goes to display the web page with the inbox, it errors out. I am running Exchange 2003 SP2 on Windows 2003 R2 SP1 with all the latest patches. I have compared all the setting on both the virtual servers and everything matches. Does anyone have an idea? Thanks for the help. "Webiknight" <webiknight@gmail.com> wrote in news:1170254590.1509...

limit size of integer in number field on form
I have a quantity per field set up in my SQL Server file (adp project) as precision 11 scale 5. This means the largest number I can store is 999999.99999 . I have a subform that this field is entered on (datasheet view) and if a user keys in a number that is 7 digits long (one longer than what is allowed) I get the error "multiple step operation generated errors". I can trap for this error in the forms On Error event but it's just the generic error 2757 which covers a lot more errors than mine. And the control.value doesn't contain what was keyed in, it just has the old v...

I am trying to round up to the nearest 25 cents
I am trying to round a money value to the nearsest 25 cents and it keeps rounding to the nearest dollar HELP Try =CEILING(A1, 0.25) In article <2DB8F007-1E27-4A48-923B-C7D4D0238B5E@microsoft.com>, sypher <sypher@discussions.microsoft.com> wrote: > I am trying to round a money value to the nearsest 25 cents and it keeps > rounding to the nearest dollar HELP =ROUND(A1*4,0)/4 -- HTH Bob Phillips "sypher" <sypher@discussions.microsoft.com> wrote in message news:2DB8F007-1E27-4A48-923B-C7D4D0238B5E@microsoft.com... > I am trying to round a mone...

Cannot add business unit or team
Any of the 3 CRM system admin users I have tried couldn't add neither unit nor team. No modifications have been made to the security roles. Error message: UnauthorizedAccessException: Access is denied.] Microsoft.Crm.Platform.ComProxy.CBizTeamClass.CreateAndRetrieve(CUserAuth& Caller, String TeamXML, Int32 Count, String[] Members) +0 Microsoft.Crm.Application.Platform.Team.InternalCreateAndRetrieve(String xml, String columnSet) Microsoft.Crm.Application.Platform.Entity.CreateAndRetrieve() Microsoft.Crm.Application.Forms.AppForm.RaiseDataEvent(FormEventId eventId) Mic...

Trying to clear up Received but not invoiced report
I am trying to clean up the received not invoiced items. The problem began with entering a purchase order and then not matching the invoice to the items received agaisnt the purchase order. SO we thought that doing a returned transaction entery would solve the problem. The only thing is now the return shows up on our Received/ Not invoiced report. And the report is becoming a huge mess and difficult to use. What is the best way to clear up items that have been received but were not matched and already paid through the invoice entery? There is a knowledgebase article on this very thing av...

send/receive (2nd try)
New computer. Microsoft XP Home. Microsoft Office XP Small Business 2002. Earthlink dial-up account. Two e- mail accounts. After opening Outlook, 1st send/receive (option 3, all accounts) usually prompts for both passwords, downloads messages, all good. Next time, though, no prompt for account 2, error cannot connect to server, account 1 usually gets messages. Every five minute send/receive option eventually degenerates to cannot connect to server errors for both accounts. Meanwhile internet browsing slows to a crawl. Any ideas? ...

How do I... On opening file from hard disk, open a form
Hello, Microsoft Access 2003. I would like my Main Menu form to open when a user opens my database. So far I am in no way networked or web based, I'll probably get there but right now I have a file (Inventoryv4.mdb) that resides on the user's hard drive. when she opens this file, I would like my main menu form to open, instead of her having to go through the little task pane and dbl clk on frm_MAINMENU. How might one do this? ***Note: I need the task pane with all the tables queries, forms etc to still be there, just in the background, preferably minimized, and the main men...

How to send email after entry from data access page
I hope this is an easy one, but i am not a programmer. I got volunteered for this because i built an inventory database. Access 2003I have a simple referral table that i have linked to an "Input" page for people to enter records (including a drop down list of email addresses). And an "Output" page where pepole can come and edit. That part seems to be working fine.I need to have an email sent out when a new record is posted. Ideally, i would like it to be sent out based on who is selected in that email list, but i would settle for anything at this point.Thank you in adv...

How do I cancel a msg Outlook keeps trying to send unsuccessfully?
How do I cancel an "in process" email Outlook keeps trying to send unsuccessfully due to a huge email message I tried to send with way too many attachments? It's stuck in "send" mode, and as a result, I can't send any emails because Outlook cannot get past trying to send this message. How do I cancel a pending outbox transmission while it's trying to send? I've tried everything I can think of to no avail. Please help! Angelczech wrote on Fri, 12 March 2010 07:32 > How do I cancel an "in process" email Outlook keeps trying to send ...

how to add bound image to a form
I have problem to add bound image in the table. I want to do students database. Could help me to solve my problem. I want a form which can displays a different image as I look other students database Joe, If you open the form in design view, you should be able to drag the image from the field list onto the form. If haven't done it, you need to add an OLE type field to the table. God Bless, Mark A. Sam "Joe" <Joe@discussions.microsoft.com> wrote in message news:D9A3E056-80C9-4D22-854D-D3C01E0E0FC1@microsoft.com... >I have problem to add bound image in the tab...

trying to insert a 0 in front of zipcode
Hello, I do not use excel at all so i have no clue! I have a list of daycares that i want to create mailing labels with...about 700 of them but the problem is my zipcode column there needs to be a zero in front of all 700 zipcodes how to i insert a zero in front of them without having to type it into each box? the other question is can i print labels directly from excel or do i have to go thru ms word? thanks Greg One of these 1) format the cells with custom format 00000 2) format the cells with Special / Zip Codes 3) format the cells as Text 4) begin all zip codes with an sin...

Adding data in two columns
Help! I am working with data in two columns and would like to total the dupilcate numbers giving me a sum total. Example: Column A Column B 12345 4 12345 2 12345 6 I would like to combine all into one line that would look like: Column A Column B 12345 12 Any suggestions would be greatly appeciated!! Shawn Hi use a pivot table for this. See: http://www.cpearson.com/excel/pivots.htm http://peltiertech.com/Excel/Pivots/pivotstart.htm http://www.contextures.com/xlPivot02.html http://www.ozgrid.com/Excel/excel-p...

error message when trying to install WMP 10 or 11
My operating system is Windows XP Home Edition 2002. I'm trying to download either WMP 10 or 11 and I get a message saying it was not possible to complete setup, see webhelp for more assistance, however there is no additional information when I click Web help. the Error message is 8007F0DA. Can anyone help me? Thanks. On Tue, 30 Mar 2010 07:54:01 -0700, Nate <Nate@discussions.microsoft.com> wrote: > >My operating system is Windows XP Home Edition 2002. I'm trying to download >either WMP 10 or 11 and I get a message saying it was not possible to &g...

access-problem saving forms and reports
I have a problem every time im trying to save a form in access. It doesnt matter to what table i create a form or a report,the access wont allow me to save it and puts on an error message: "microsoft office access doesnt have the option to save the form or the report because he presents chars from a language that cannot be be saved in your system area. switch your system area to the language in the form or the report and than try again". my office is in hebrew and my windows in english,i have passed all the data in the table and in the form between the languages back and fort...

can't add addressses to contacts from incoming mail
when I recieve email in outlook2002 I can see the persons name in the 'from' field, but can not add it to my contacts - there is no feature to do this. And if I click reply, it just puts the 'display name' and not the email address in the reply so I can not send them replies. The only way to fix this is to ask them to type their email address in the body of the email message and then add it to my contacts list. Is this a bug? Or a design feature??!! ...

Exporting data using Pulldown List & VLOOKUP
Hi Friends, I am developing a portfolio tracker excel file. I am having some difficulty in implementing one function, which I think I cannot create using macro. I am downloading various parameters using the SMF Add-In. Which is working fine. After downloading these data I want to export them into the other sheet "Pull Down Option". I tried to use OFFSET and VLOOKUP function. But it is not working. In the Pull Down Option sheet, I have created a droop down list, so when I change the droop down list, the data associated (Sheet Data) with it & a stock symbol shou...

How can I add menu to a dialog?
Can anybody help me , how to load menu(created using menu editor) on a dialog..? Thankz in advance Create a menu resource in editor. Select the dialog you want to attach this menu to. Right click on the dialog, click on properties. In the ensuing dialog, select the menu you created from the combobox. -- Ajay Kalra [MVP - VC++] ajaykalra@yahoo.com "Tony Thomas" <mailtonythomas@hotmail.com> wrote in message news:#gjQSrphEHA.3664@TK2MSFTNGP11.phx.gbl... > Can anybody help me , how to load menu(created using menu editor) on a > dialog..? > Tha...