Question about Microsoft Office Access 2003 (077-02871) for PC

1 Answer

Access-VB Hi, I am working on a project where in I am trying to save a record in Access 2007 through a form using the VB code. But unfortunately I am unable to save the record. Please help me with the VB code to save a record on clicking the save button in the form.

Posted by on

  • 2 more comments 
  • paravastu Jul 16, 2008

    lkkk

  • paravastu Jul 23, 2008

    Hi

    Thank you for your response.

    I am using VB code.

    The file is not on the server.

    Hoping to hear from you soon

    Regards,
    Jaya


  • Tim Babcock
    Tim Babcock May 11, 2010

    Send the code to me at timbabcock@earthlink.net. I'll take a look at it. I have an ftp server you can send the database too as well. Make sure it's in Access 2002 format.



  • Tim Babcock
    Tim Babcock May 11, 2010

    Is the database defined in the ODBC drivers section of your panel if it's local?



    Is this file on a server?

×

1 Answer

  • Level 1:

    An expert who has achieved level 1.

  • Contributor
  • 1 Answer

Use this line below:

Private Sub CommandButton_Click()

Dim NumericValue as Integer
Dim StringValue as String

NumericValue = CInt(TextField1)
StringValue = TextField2

DoCmd.RunSQL "INSERT INTO NameOfTable ( [FieldName1], [FieldName2]) VALUES (" & NumericValue & " , '" & StringValue & "');"

EndSub

I Hope this work for you... God Bless

Posted on Aug 09, 2008

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

What is the extension file name for a microsoft access file?


According to Wikipedia:-

Access Project .adp
Access Blank Project Template .adn
Access Database (2007) .accdb
Access Database Runtime (2007) .accdr
Access Database Template (2007) .accdt
Access Database (2003 and earlier) .mdb
Access Database, used for addins (2,95,97), previously used for workgroups (2). .mda
Access Database Template (2003 and earlier) .mdt
Access Workgroup, database for user-level security. .mdw
Access (SQL Server) detached database (2000) .mdf
Protected Access Database, with compiled VBA (2003 and earlier) .mde
Protected Access Database, with compiled VBA (2007) .accde
Windows Shortcut: Access Macro .mam
Windows Shortcut: Access Query .maq
Windows Shortcut: Access Report .mar
Windows Shortcut: Access Table .mat
Windows Shortcut: Access Form .maf

Jun 03, 2010 | Microsoft Office Access 2003 (077-02871)...

1 Answer

How to link vb 6.0 to msaccess?


You Need ODBC to solve your link... ODBC is a gateway. Can Access by Microsoft Access or VB in same time... Note: Please in Code Programming you must lock or unlock you data if you want application running same time..

Jul 20, 2009 | Microsoft Business & Productivity Software

1 Answer

How to make macro using the VBA


You can "record" a macro and look at the code or write one yourself. To see code, you'll need to open the VB Editor using <ALT+F11>. You may also enable the "Developer "tab in the Ribbon using the Options dialog and going to the "Popular" tab. From the Developer tab you can access the VB editor. From this tab you can recod a macro too.

Feb 23, 2009 | Microsoft Office Professional 2007 Full...

1 Answer

Tabs/sub-form in access 2007 form will not scroll down?


open the form in design view open the properties dialog box by right clicking in the general form area not in the gray area of the detail section. In the properties click on the format tab. In the format tab goto the default view and select continuous form. This should create a virtical scroll bar once a record in the data base.

Dec 30, 2008 | Microsoft Office Professional 2007 Full...

1 Answer

Increment a number per record in Microsoft Excel


For what you are talking about doing, Microsoft Access would probably be a better option. With Microsoft Access, you can create a custom form and have it automatically give a number.

More information about Access:
http://www.bcschools.net/staff/AccessHelp.htm

Dec 18, 2008 | Microsoft Excel for PC

3 Answers

Connectivity between HTML page and Ms-Access


<HTML>
<BODY>
<%
Set MyConn = Server.CreateObject("ADODB.Connection")
MdbFilePath = Server.MapPath("sample.mdb")
MyConn.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & MdbFilePath & ";"
SQL_query = "SELECT * FROM Friends"
Set RS = MyConn.Execute(SQL_query)
WHILE NOT RS.EOF
%>
<LI><%=RS("Name")%>: <A HREF="<%=RS("Link")%>">Homepage</A>
<%
RS.MoveNext
WEND
%>
</BODY>
</HTML>

Nov 11, 2008 | Microsoft Office Standard for PC

2 Answers

Access 2000 and Access 2007


good day,

this is an issue about compatibility between access 2000 and access 2007. in other softwares, opening a file saved in an older version is not a problem, however it seems it's not true in your case.

try opening the file again and use "Save As" and use the access 2000 version, maybe access 2007 will "downgrade" its system and would make your forms function properly. however, if this will not work, you have to work on a computer with access 2000 installed.

i hope this helps

Oct 13, 2008 | Microsoft Office Professional 2007 Full...

1 Answer

Ms access


Stored Procedures don't exist in MS Access. You do have the following options though. Queries, which are just select or action queries. VB Code, which you can write using Query Objects as if you were writing a Visual Basic application. These can be Functions or Subroutines. In these, you would use the standard programming techniques with while and for loops, etc.

You can create complex situations combining the two of these. A function in the VB code area can accept through parameters, the single values (line by line, record by record) in a query and act on them and manipulate the values.

For example: create a query that does a select phone from address. Create a function in vb called public function StripDashesInPhone(Phone as string) which then uses VB coding to strip dashes from each phone value passed in. To make it all work, in the query on one of the field columns put "NewPhone: StripDashesInPhone([Phone])" and for every record processed in the query, the function is called with the [Phone] field value passed in to the function and the action is processed and returned.

Other than writing a function that is activated by a form button click, which opens the current db and opens a table and process it, just like in VB, this is about as close to cursors and oracle procedures as you get.

I wish it was more, but ...

Oct 09, 2007 | Microsoft Office Standard for PC

1 Answer

Import excel sheet in vb.net 5


you have to make link in you vb then you can save the xls files on same format

Oct 08, 2007 | Microsoft Office Standard for PC

Not finding what you are looking for?
Microsoft Office Access 2003 (077-02871) for PC Logo

79 people viewed this question

Ask a Question

Usually answered in minutes!

Top Microsoft Business & Productivity Software Experts

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

Les Dickinson
Les Dickinson

Level 3 Expert

18304 Answers

Tony

Level 3 Expert

2598 Answers

Are you a Microsoft Business and Productivity Software Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...