473,789 Members | 3,084 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to save rest of my fields

140 New Member
Expand|Select|Wrap|Line Numbers
  1. Private Sub cmdsave_Click()
  2.  
  3. If imagebox.Picture = LoadPicture("") Then
  4.     MsgBox "Please browse the image you want to add to your database.", vbExclamation, "Image required"
  5.     browseimage
  6.     Exit Sub
  7.  
  8. ElseIf shotcombo = vbNullString Then
  9.  
  10.     MsgBox "Please provide shot number.", vbExclamation, "shot number required"
  11.     shotcombo.SetFocus
  12.      Exit Sub
  13. End If
  14.  
  15. 'Add mode only
  16. If addmode = True Then
  17.  
  18. Set storyboard = New Recordset
  19.     storyboard.Open "SELECT * FROM shot", CON, adOpenKeyset, adLockOptimistic
  20.     storyboard.AddNew
  21.     storyboard("shot") = shotcombo
  22.     storyboard("filename") = Filename
  23.     storyboard.Update
  24.  
  25.     SavePicture imagebox.Picture, App.Path & "\" & Filename
  26.  
  27.     question = MsgBox("Image saved to database. Do you want to add another image?", vbExclamation + vbYesNo, "Image saved")
  28.  
  29.     If question = vbYes Then
  30.         resetfields
  31.     Else
  32.         Unload Me
  33.     End If
  34. End If
i can able to add only my 2 fields using this save command. i want rest of my fields get saved using this save command. how to do that.

other fields are, sequence, scene, action and dialogue. i tried using if condition but didn't work.

help me out
Jan 31 '07 #1
3 1347
willakawill
1,646 Top Contributor
Hi. You can add the other fields in this section:
Expand|Select|Wrap|Line Numbers
  1. Set storyboard = New Recordset
  2.     storyboard.Open "SELECT * FROM shot", CON, adOpenKeyset, adLockOptimistic
  3.     storyboard.AddNew
  4.     storyboard("shot") = shotcombo
  5.     storyboard("filename") = Filename
  6.     storyboard("anotherfield") = anotherfield
  7.     storyboard.Update
Jan 31 '07 #2
indhu
140 New Member
Hi. You can add the other fields in this section:
Expand|Select|Wrap|Line Numbers
  1. Set storyboard = New Recordset
  2.     storyboard.Open "SELECT * FROM shot", CON, adOpenKeyset, adLockOptimistic
  3.     storyboard.AddNew
  4.     storyboard("shot") = shotcombo
  5.     storyboard("filename") = Filename
  6.     storyboard("anotherfield") = anotherfield
  7.     storyboard.Update

thank u so much, its working.
Feb 5 '07 #3
willakawill
1,646 Top Contributor
thank u so much, its working.
You are very welcome :)
Feb 5 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

4
25031
by: Andras Gilicz | last post by:
Hi VB fans I'm working on a relatively large project in VB6 with about a dozen forms, including graphs, labels, text boxes, etc. The software itself is actually a flow simulator with more or less complex technical calculations, several input variables. I would like to equipp the starting panel with the usual New, Open, Save, Save As, Close etc. menus (like in Excel, or Word, etc.) What is the best way to accomplish Save, or Save As?...
3
1971
by: kbarsi | last post by:
I have created a new web form .aspx in VS.net with a couple of fields. I would like to add a button that when clicked will save the information from the fields into a newly created record in my sql database. I am having problems with this. Can anyone help please?
13
1603
by: Mike MacSween | last post by:
Well, I suppose it was only 20 minutes work, but it would have been nice if I'd been prompted to save that new code module. After all, they ask you if you want to save new forms, reports etc.
5
3052
by: Øyvind Isaksen | last post by:
I have a page with an optional integer-field, and one asp:calendar control. I use a stored procedure to save the data in SQL Server. When all fields contains data, the code works great! But if the user dont fill in the optional "price-field" (integer value), or if the user dont choose a date in the asp:calendar control, I get the message "Input string was not in a correct format". How do I save "Null" value if the price-field is blank,...
3
1991
by: kevin.vaughan | last post by:
Hello Everybody and Everymind, I am using Access 2003 on an XP network. The code below activates from a command button on a form. It selects data from a table and then displays it in a cell on the subform. It doesn't however save it to the subforms' recordsource. Other cells in the subform don't have this trouble. Does anyone know what I could do to make Access save the information to the recordsource? Regards
4
2761
by: georges the man | last post by:
hey guys, i ve been posting for the last week trying to understand some stuff about c and reading but unfortunaly i couldnt do this. i have to write the following code. this will be the last time i ask for an entire code or u can give me the outine of what to do and i ll do it by myself. the description is the following: the program will read a text file that contains historical price of a stock. The program will allow users to query...
14
3690
by: squrel | last post by:
Hello everyone, I m using some button using toolbar such as Add,Save,View,.... my save button is not working.... it doesnt give me any error but does not save to my database.... or showing in my gird... Plz Help here is my code for save button Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button) On Error GoTo ChkErr If Button.Index = 1 Then Mode = "Add" Call AddMode Call...
5
2109
by: terrybell105 | last post by:
I downloaded Stephan's utility from his website but can't get it to work - or maybe I'm not driving it properly! The form works OK with the existing 3 "views" - I can switch between them and they display changes fine. But if I add or remove a table from any one of them, strange things happen. For example: start with a fresh copy of the downloaded database. Open the form and click on the "Admin" view. Right click and click on "Show Table"...
0
2007
by: mokoujan | last post by:
Hello all I am currently developing a WCF REST service. One of the requirements is to allow the users to search data via the rest interface. As such key field information is passed in the URL. The number of key fields can vary and as such a request string format is used to collate all the required fields into one URL parameter. This means I am hitting the limit of 260 characters for each url parameter
0
9511
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10408
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10199
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10139
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9020
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7529
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6768
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4092
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.