User Profile
Collapse
-
Not only is my database due very soon (i.e. Wednesday), but I'm also leaving the country. Does anyone have any possible solution to this inquiry? I've tried opening the form in read-only and excluding the combobox. I don't even know where to begin, so I tried making up VB code using "AllowEdits " to see what would happen, but, of course, nothing. Any help would be greatly appreciated. -
Again, thanks for the help, Rabbit. This is the code I used ultimately:
[CODE=vb]Private Sub FilePath_Click( )
Rem Me![AutoNumber]
Dim stlink As String
stlink = Me![FilePath]
FollowHyperlink stlink, , true
End Sub[/CODE]
I have a couple related problems that I've posted in their separate threads. I've searched on-line and tried changing the VB (unwittingly--my...Leave a comment:
-
FollowHyperlink, Then Set Focus to Linked App
When I click on a linked file on my form, I use the following code to execute the corresponding application (e.g. IE, Word, Excel):
[CODE=vb]Private Sub FilePath_Click( )
Rem Me![AutoNumber]
Dim stlink As String
stlink = Me![FilePath]
FollowHyperlink stlink, , True
End Sub[/CODE]
When the file opens, the corresponding application window flashes briefly and the... -
Display File Title, Link Using File Path
I used the Common Dialog API to store file paths on my form's underlying table. These paths are displayed in a textbox that I can click to open the selected file.
Having stored the file paths in a textbox on my form, I then changed VB code in a linked module from lpstrFile to lpstrFileTitle (in Line 50 below) to get the file's title instead of the full path. Now, I'd like the file title to keep showing up in the textbox, but I obviously... -
I had tried this setup for tblDocs before, but I would get mismatched data types. It turns out I needed to make ResourceID a number data type to receive the AutoNumber from the preceding table. This seems to be working fine now. Thanks so much, Rabbit....Leave a comment:
-
One-to-Many Relationship: Suggestion Requested
I have a subform (sfrmDocs) that I would like to link to a main form (frmViewAllReso urces). I'm trying to make sfrmDocs a continous form that would allow the user to associate files. These are the underlying tables' fields:
tblResources
==========
AutoNumber [PK]
RecordDate
Quantity
FiscalYear
BulkObligation
Project
Resource
Type
GeneralDescript ion
Subobligated... -
Need Call Shell to Open Selected File Using Default Program
After using the Common Dialog API to store a file name in a field "FilePath," I use the...Code:Private Sub FilePath_Click() Rem Me![AutoNumber] Dim stAppName As String Dim stlink As String stlink = Me![FilePath] stAppName = "C:\Program Files\Internet Explorer\IEXPLORE.EXE H:\Application\Cables\" + stlink Call Shell(stAppName, 1) End Sub -
Oh, would it help if I used and based the report on a query instead? I'm guessing this way I can combine all the records I need.
UPDATE:
It appears to have worked. Now I don't need all the long references like below:
e.g. [CODE=vb]
=Forms!frmViewA llResources!sfr mAdminTab.Form! Requestedby
[/CODE]Leave a comment:
-
A short follow-up to my attempt to auto-wizard drag-&-drop subforms into the report:
The beauty of just dropping an auto-wizard subform into the report is that it allows you to link the controls using a parent/child relationship. I tried this and formatted each subform dropped into the report as if I were using unbound controls that I could just move around and manipulate. I was very pleased. Sadly, when I went back to frmViewAllResou rces...Leave a comment:
-
OK, the main problem is this: The report is bound to "tblResourc es," which makes it easy to bind any unbound control, as long as the control source is a field (e.g. Resource) in tblResources. However, if I have an unbound control refer to another table's/form's control, then I get "#Name?" in those controls. Why? Apparently, it's because the form (i.e. the one to which these controls refer) isn't loaded (i.e. open.)
...Leave a comment:
-
Hi, Rabbit. Thanks for your prompt reply. I've decided to give up on this "piggyback" combobox approach. You're right: Agency can't possibly be a primary key because I want it to be repeated. I tried making it a concatenated key with the input from the FiscalYear table. Even still, I was ending up spending way too much time on this.
What I've decided to do is eliminate the FiscalYear altogether and just make the Agency...Leave a comment:
-
Enter Records Based on 2 Related, but Independent Comboboxes
I had to present my DB today, but was granted a chance to fix something about it. In order to fix something, I added something...som ething that is giving me more trouble than it should. I have to present again tomorrow. Quick assistance would be greatly appreciated.
I have three forms (one main form and two subforms) with the following fields:
frmResultsFY
FiscalYear [PK]
sfrmResultsAgen cies... -
Yeah, sorry about that! I always forget to encircle one-line codes with the Code Tags.
I tried them--no luck. I think I'm going to try just using the wizard to create the subforms within the reports. I initially created the report with all unbound controls (in order to design it "freehand") and then wanted to associate all the controls accordingly afterwards. Well, I don't know why I'm still having trouble...Leave a comment:
-
Here's some new information: The main form control sources are now working. It turns out the report is based on the table (tblResources) and only needs a field reference (e.g. AutoNumber) and not the whole "Forms!frmView. ..etc." syntax. They would work some of the time because they were referencing the right controls on the right form when it was loaded (i.e. open). When I'd close the corresponding form that was open in the background,...Leave a comment:
-
Thanks, Jim. I've used the expression builder and believe that I've correctly linked to the sub-forms through the loaded forms. The problem appears to extend to the main form as well. I'll keep plugging away on my end, but any further thoughts would be appreciated....Leave a comment:
-
Getting #Name? in All Report Fields
Tomorrow's my final presentation of my DB and I ran into an unexpected problem: I access a main form called frmViewAllResou rces with several tabbed subforms through my switchboard. There's a preview and print button on the main form that generates a report called "Commoditie s." It previews and prints all the relevant fields from the main form and subform just fine.
On my switchboard, I can also access a form to print reports... -
Yeah, I was pretty sure that was the problem. So, while I'm content with your fantastic codes, I just might insert the code into the tab instead of in the main form...if I'm brave enough....Leave a comment:
-
Yeah, this works just fine. I should have a week dedicated to troubleshooting next week, so I'll see what I can come up with. Thanks again!Leave a comment:
-
Wha'...? Weird...do you all smell that? Yes, I smell genius. Thanks, ADezii. That seems to have worked perfectly.
Yet, it appears that the Access gods aren't finished taunting me. I noticed something strange: When there is no image and this same "Click Add/Change..." text is visible, it appears in the very same place on other tabs and right over textbox controls. Any idea how to limit it to the uppermost tab? Than...Leave a comment:
-
Oh, I do have a slight issue, though: When I select my picture and it appears, the default text ("Click Add/Change to add image") remains over the image until I go to the next record. When I come back, it's gone. smorrison's (Northwind's, rather) code above tells this default text to become invisible after the image is selected, so I'm not sure why it stays until I change records. Any thoughts?Leave a comment:
No activity results to display
Show More
Leave a comment: