473,605 Members | 2,637 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Showing details for one specific record / Drag and drop files to get a link to them

2 New Member
Hi there,

I’m not used to working in VB and I think this situation calls for excactly that. I use Access 97 SR-2.

My first table is a table containing all the Tickets I got. The field ”Ticket” is simply a ticket-number.

I’ve made a form in which I am to choose an existing Ticket and write a description for it pluss other things. The description to these Tickets are stored in another table called ”LogBook”. I then made a query on all of those Tickets which have not yet been described in ”LogBook”, and which is shown in the same form, so that I can quickly pick one Ticket out which lacks description.

The information in the two tables; ”Tickets” and ”LogBook”; is linked through the ticket-number. And that is the only information which is the same.

What I want is to show details such as date, time and price from the table ”Tickets” when I have chosen a number to be stored in ”LogBook”. Making a query where the number in ”Tickets” is the same as in ”LogBook” only results in showing all the records for every ticket recorded in ”LogBook”. So, specifically, I want to show details for just that ONE specific record that I am currently viewing in my form. And I have absolutely no idea of how to do that. I am pretty sure it involves VB, but how can I: chose a ticket, and when the ticket is chose, query upon that exact ticket and show it’s details from another table in the form.

The other problem that I have is far too advanced for me. I want to aquire a link or an address to a chosen file without typing it manually (not a specific and static filename). I collect pictures in one folder and I link them to a table in the database (ie. ”Pictures”), and for some of these pictures, I link them to the ”Tickets”. I did find out how to show the picture in the form for every record it existed. Now I would like to know if there was another way of getting the link of the files to the tables instead of typing it. So specifically, I want to know if I can drag and drop the file from ie. my desktop to a field in a form which then translates the object into an address and stores it as a link (as text and not an OLE-object; not hyperlink either as I then can’t get Access 97 to show me the pictures for every record).

The third is just a curiosity: I use a rating on a scale from 1 to 10; ie. I rate the pictures. I have one table in which I store the scale and the meaning of the numbers. Is it possible to have a ”Rating”-form in which there are 10 checkmarkers or buttons; where one marker only represents one of the ratings?

This is just for apperance sake. I am currently using a list which is dragged all the way down showing all the 10 numbers.


I really hope someone out there will be willing to help me out. You don’t have to answear each and every question posted here.

Kind regards,

jg
Jul 23 '06 #1
2 3318
comteck
179 New Member
The first problem you mentioned, I don't think I quite understande what you are asking. I'm going to give what I think might be solutions, but I'm not sure if it will help because like I said, I don't quite understand the problem.

Problem 1 - I'm not sure if you want to limit the number of fields you want to show on your form, or if you want to actually filter the records (by "filtering" I mean, selecting a record from a list of tickets, and displaying just that ticket with all of the fields you selected in your query). If you just want to limit the number of fields, it's just a matter of limiting them in your query, form, or report (i.e only drag the fields that you need).Only problem with that is if you don't drag a field in your query, you won't be able to use it on your form.
If it's filtering you want to do, then let me know. It's a little more complex, and I won't type it all out if that is not what you are looking for.Let me know.

Problem 2 - For problem 2, I can see what you're asking... I'm just not sure how it's done (or if it even can be done). The best I can tell you at this point is to set up a field in your table as an "OLE Object" datatype (give the field a name, say "image1"). Then, on your form, create a Bound Oject Frame, and the control source will be the OLE Object (i.e image1). You can then drag your images onto the Object Frame, and they will be displayed as the image name on the form. The only thing is this is not a link. The image is stored in the database itself. I'll keep looking.

Problem 3 - Add another field to your table (call it "Rating"). On your main form, have 10 checkboxes, and a textbox (call the textbox "Rating". Its control source would be "Rating" from the table). For appearances, you might want to put a rectangle around the 10 checkboxes, or include them in an option group. Then on each checkbox, create an On-Click Event. (While in design form, right click on a checkbox, and select "Build Event". Then choose Code Builder). The following code will appear:

Sub checkboxname _Click

End Sub

Between the "Sub" and "End Sub", type in the following line.

Me.Rating = 1

The final code should be:

Sub checkboxname _Click
Me.Rating = 1
End Sub

Do the same thing for the other nine checkboxes, making the rating equal to 2, 3, and so on. Now when you run the form, depending on which checkbox you select, the rating should appear in the "Rating" textbox.

Don't know how much I helped. Let me know.
comteck
Jul 23 '06 #2
Timbo
2 New Member
Problem 1

The solution with using a filter does not work. My problem is that the form has to show both input as well as output at the same time. But I want the output to change depending on the input.


Comteck: ”If it's filtering you want to do, then let me know. It's a little more complex, and I won't type it all out if that is not what you are looking for.”

I will try clarifying things with an example. Hope I don’t end up like Columbus (knowing only where I started from).

Two tables are created: Ticket.* and LogBook.*
Ticket is the table where I import all my tickets into.
LogBook is the table where I make descriptions, rate, and link up with a couple of pictures.

One of the fields in the Ticket table holds detailed information about date and time; information in full-text format as in ”July 24 2006 10:36 AM”. I do not know how to re-format this information into something usefull so I made a query which breaks this field up into smaller parts using the InStr-function. I then get one field for each information (July; 24; 2006; 10:36; AM) which I then collect once more using DateSerial and TimeSerial.

At last, I make one more query (let’s just call in Final_Query) in which I collect all the details I want to know for each ticket-record; details that help me writing a description for the tickets.

So, I made a couple of queries just to make life easier.

Then there is the description. I make a form with fields from LogBook.*. Some of the fields lookup the information in other fields (which works fine). Unfortunately, the tickets are rather nummerous or will be sometime in the future, and I would like to be able to only chose the tickets which are not previously included in the LogBook.Ticket. So I make another query where I include all Tickets except from those already in LogBook – this works as expected and I can only chose the tickets which have not already been described and used prior*. When I chose one ticket from this query in the form, then the LogBook.Ticket field gets updated by this ticket-number. But I would like to display the other necessary details (date, time etc.) mentioned in the other query, but only for a matching ticket and not all of them at the same time (which is what I get – I can’t figure out how to say ’show only the records in the query for the matching ticket in the form’).

(* But I have not found out how to update the form so that the tickets are excluded immediatly from the form; ie. ticket 1000 will be shown until I’ve closed and opened the form again. I put this down here so it doesn’t confuse too much.)


Problem 2

I found an article about dragging and dropping: http://www.mvps.org/access/api/api0032.htm
But to use it you have to have this as well: Access/Office and AddressOf Operator: http://www.mvps.org/access/api/api0031.htm

I’m not a coder so I don’t know what it does specifically. But is there no way to just get the link and not the object itself? My pictures are typically 100-250 kb and there are quite a few of them. Making OLE-objects out of them would make the database pretty huge – although it could be possible to make an OLE-base and then link them together… would that improve performance?


Problem 3

This works as expected – thank you. The only caveat is that pushing one button activates it, but pushing another button does not deactivate the first button, so now there are two buttons pushed – although the number is correct since: me!buttonx.rati ng = number.


I hope I did not confuse you with Problem 1. I actually did end up like Columbus. Well, almost… I knew where I came from and was going… but I didn’t know where I was.


Kind regards,

jg
Jul 24 '06 #3

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

Similar topics

5
3224
by: IdeaMan | last post by:
Windows 2000 Access 97 I am working on an issue tracking DB, where I need to link (not attach due to size)screen prints of various system errors. I have created a public folder on a network drive to store these images, under the assumption that no one will originally save them to that location. To resolve this, I need to copy the file to this location without possibility of user error in selecting the correct folder (the DB is to be...
7
7842
by: Johann Wagner | last post by:
Hello! I want to drop an email in my C# application. I get the drop event and the dataobject. But i cannot interpret the data in the dataobject. So i cannot get the email. I have found a code sample for getting appendix via drag&drop, but this doesn't work for the email, too. Can somebody give me a tip how i can get the email? Regards, Johann
2
4316
by: SamSpade | last post by:
There seems to be two ways to put things on the clipboard ( I don't mean different formats): SetClipboardData and OleSetClipboard If I want to get data off the clipboard do I care how it was put there? What about Drag/Drop; is there more than one way for the source to make data available Is it always OLE?
3
10397
by: Ajay Krishnan Thampi | last post by:
I have a slight problem implementing 'drag and drop' from a datagrid to a tree-view. I have pasted my code below. Someone please advice me on what to do...pretty blur right now. ==code== using System; using System.Drawing; using System.Collections; using System.ComponentModel;
1
1925
by: Robin Tucker | last post by:
Apologies for the ambiguous title, you will be expecting me to be asking how to perform drag and drop from my application into another application. Well, kind-of. I've got drag and drop sorted, apart from one thing. I'm dragging and dropping items from my treeview and listview which represent database "Images" (blobs). Now, I don't store the blob in the tree, I fetch it when I need it. This is a problem for drag and drop, because, for...
6
4947
by: James Allen Bressem | last post by:
I was searching through the MSDN documentation trying to figure out how to do drag n drop and I found a sample program. The sample program did all sorts of fancy junk like dynamically create it's user controls etc. (pomp - is it really necessary to be so gaudy when trying to explain a simple point?) So, realizing the state of the economy and the period of history in which I was so unfortunately born, I spent the next 3 or so hours weeding...
14
3095
by: maya | last post by:
I need a drag-n-drop script.. I have found one here.. http://javascript.internet.com/page-details/drag-n-drop.html each div containing an image has an id, and each image has a name, as in <div id="h" style="position:absolute;left:100;top:350;"> <img src=http://javascript.internet.com/img/cards/hearts.gif name="h"> </div> but I don't see where he references these id's and names in the JS code..
1
3271
by: Staal | last post by:
My C# application supports drag and drop of files, folders, shortcuts and links from other applications into mine. This all works pretty nicely, except that I am trying to get a little more information when a web link is dropped onto my application from Internet Explorer. When you drag the link in the Address bar of Internet Explorer to your desktop, the desktop shortcut that gets created has the Title of the web page as it’s name,...
2
5266
by: Andreas Mueller | last post by:
Hi All, I'm trying to show a context menu during a drag drop operation similar to the windows explorers right click drag and drop behavior (A full working sample is at the end of the post): void treeView1_DragDrop(object sender, DragEventArgs e) { ContextMenu mnu = new ContextMenu(); mnu.MenuItems.Add("Click me", OnCmClick);
0
8004
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7934
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
8425
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
8418
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
8071
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,...
1
5886
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
5445
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();...
1
2438
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
1
1541
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.