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

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi,
a 6ya expert can help you resolve that issue over the phone in a minute or two.
best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
the service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need.
goodluck!

Posted on Jan 02, 2017

Add Your Answer

Uploading: 0%

my-video-file.mp4

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

×

Loading...
Loading...

Related Questions:

1 Answer

How to make the library managment project with VB.Net & using MS Access as for database.& please help me out what code should I use for making that project?


firstly you have to create a database and in that you have to create tables as per your requirement.
secondly, create forms in vb and connect the database, as per your requrement. it is not possible to give all the codes. use some e-books.

Nov 19, 2009 | Computers & Internet

2 Answers

Please send me the code to link two forms of a project file...actually i wanted to to transfer a variable value from one form to another...please forward code as soon as possible


if this is vb 6 then you should be able to access the other variable by using the other forms name so if you are in form1 and want to access a variable in form2

form2.variable_name

and visa versa

If this is another language then it may differ

Apr 30, 2009 | Computers & Internet

1 Answer

Microsoft Access query in VB


first you need to create a record set to do this, after creating a record set RS1. please follow the code below:
Update the code as per your requirement.
Rs1.Open "Select * from table_name where UserName = '" & UName & "'", Cn1, adOpenDynamic, adLockOptimistic

Mar 14, 2009 | Microsoft Visual Basic 6.0 for PC

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...

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

Stand alone vb programme


yaa you can use the Setup Wizard from your VB for your project. It will make a setup for your project and will put all the runtime required files in a same folder, with your project executable with a setup.exe file. Copy all these files in any device like CD,DVD, Flash memo etc, in a same folder. And run this setup on any computer to which you want to install it.

Then your project will run on that computer.


Thanks
Iqbal

Mar 31, 2008 | Computers & Internet

3 Answers

Solution for converting image(jpeg,.bmp) to string


hi prem,

i really cant answer your question but im hopeful that maybe this link will help you in your troubles.

thanks for using fixya

Mar 30, 2008 | Computers & Internet

1 Answer

Pls hepl me wit Excel VB integration


you can use a OLE object that is available in VB as standard object. Drag the tools to your form that your creating and it will ask for create or link existing object. so now browse to the excel sheet and embed it into the VB form or use run time for manuplating the cells and other info in excel.

Mar 25, 2008 | Computers & Internet

2 Answers

Visual Basic 6.0


1. IDE is Integrated Development Environment
2.With VB 6, one can develop applications with feature rich GUIs (Graphical User Interface). Many varieties of general purpose software can be created with little effort, including, but not limited to, image editing software, text editor and database applications.
3.Windows Application Template
-----------------------------------------------------
Used to create Windows-based applications that run locally on users' machines. You can build anything from a simple single-window tool like Windows Calculator to a complete application with multiple windows and advanced capabilities.

Class Library Template
-----------------------------------------
Used to create reusable classes or components that can be shared with other projects.

Console Application Template
----------------------------------------------------
Used to create command-line applications, programs that run from a Windows command prompt and have no visual interface.

My Movie Collection Starter Kit Template
-------------------------------------------------------------------------
Used to create the pre-built My Movie Collection sample application, which you can customize to meet your own needs. For more information, see Starter Kits: Getting Up and Running Quickly.

Screen Saver Starter Kit Template
-------------------------------------------------------------
Used to create the pre-built Screen Saver sample application, which you can customize to meet your own needs. For more information, see Starter Kits: Getting Up and Running Quickly.
4.FormShaper lets you change the shape that windows draws your forms. You can have rectangles, rounded rectangles, ellipses, polygons and any combination of the above! Even save the shapes to a file for use in other projects! See readme.txt in the zip file for more details

5.Description
Used at script level to force explicit declaration of all variables in that script.
Syntax
------------
Option Explicit
Remarks
----------------
If used, the Option Explicit statement must appear in a script before any procedures.
When you use the Option Explicit statement, you must explicitly declare all variables using the Dim, Private, Public, or ReDim statements. If you attempt to use an undeclared variable name, an error occurs.
--------------------------------------------------------------------------------

Use Option Explicit to avoid incorrectly typing the name of an existing variable or to avoid confusion in code where the scope of the variable is not clear.

Feb 20, 2008 | Computers & Internet

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

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 Computers & Internet Experts

micky dee

Level 3 Expert

2642 Answers

Les Dickinson
Les Dickinson

Level 3 Expert

18343 Answers

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

Are you a Microsoft Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...