Forms :: Report Names Changing Randomly
Jul 15, 2014
In my database, my "switchboard" consists of two listboxes: "Available Forms" and "Available Reports". The Available Forms listbox lists all the forms that can be accessed, and Available Forms listbox lists all the reports that can be accessed. I did this so that I wouldn't have to create buttons for each new form or report. They all are automatically listed in the listbox for the user to double-click on to open.
Since all my form and report names are not user-friendly (ie: fmComplicatedAndUglyName, rpComplicatedAndUglyReport) I want a way for the db admin to easily assign captions for each form that the average database user would find intuitive and easy to understand (ie: "Car Maintenance" instead of fmCarMaintenance). To do this, I built a table called tbDBObjectsCaptions consisting of these fields:
dbObject_ID (PK - Long Integer)
Caption (Text)
Next, I have an unbound form (fmDBObjectsCaptions) consisting of two subforms:
1) sbfDBObjectsCaptions_Forms, which lists all Forms with captions
2) sbfDBObjectsCaptions_Reports, which lists all Reports with captions.
Each subform's record source is tbDBObjectsCaptions with an Inner Join between the table and the MSysObjects table so that I can show only forms (Type field in MSysObjects = -32768) or only reports (Type field in MSysObjects = -32764). So, the record source looks like:
Code:
SELECT tbDBObjectsCaptions.dbObject_ID, tbDBObjectsCaptions.Caption
FROM tbDBObjectsCaptions INNER JOIN MSysObjects ON tbDBObjectsCaptions.dbObject_ID = MSysObjects.Id
WHERE (((MSysObjects.Type)=-32768));
(Except the Report's subform record source Where statement would have "-32764" instead of "-32768".)Each subform also consists of a "Caption" textbox and a combobox that lists all the forms or reports in MSysObjects. The Row Source for those comboboxes are:
Code:
SELECT MSysObjects.Id, MSysObjects.Name
FROM MSysObjects
WHERE (((MSysObjects.Name) Not Like "*sbf*") AND ((MSysObjects.Type)=-32768));
(Except the Report's combobox row source Where statement would have "-32764" instead of "-32768".)My first day playing with fmDBObjectsCaptions went fine. Both subforms' comboboxes list either Reports or Forms and would easily let me choose a form or report. The subforms would record the same "Id" from the MSysObjects table into the tbDBObjectsCaptions table and each Caption I typed in was recorded into the tbDBObjectsCaptions table for each "Id" I chose. It worked just fine.
However, the next day, I noticed that the captions I assigned for forms/reports were now assigned to different forms and reports! In fact, the fmDBObjectsCaptions no longer shows any captioned reports as their Types have somehow changed from -32764 to -32768 and are therefore now displayed in the Forms subform.
Either the dbObject_ID is somehow mysteriously changing for each record in the tbDBObjectsCaptions table or the Id is somehow mysteriously changing for each record in the MSysObjects table. I don't know how or why but that's what's happening. So now, in the fmDBObjectsCaptions form, my Forms subform is displaying the wrong captions for the forms, and is also displaying records that were originally Reports (items that have captions but blank comboboxes were originally entered in the Reports subform).
I attached a copy of the database. Any different solution that allows for easy Admin'ing of displayed form/report names?
View Replies
ADVERTISEMENT
Nov 6, 2014
I have the following script which I use to modify all report settings, with an array so that I can easily list reports that I want to change the settings for, there could be 50+ reports.
I can use a string but I have to put str1 as string, str2 as string etc... whereas an array would be easier (if I knew how to do it).
Code:
Public Sub ModifyAllReportsProperties()
Dim obj As AccessObject, dbs As Object
Set dbs = Application.CurrentProject
Dim ReportName As String
[Code] ....
View 9 Replies
View Related
May 24, 2005
I have an Access database that I need to import in to a SIR database that only takes fields names of a maximum of 8 characters long.
I want to create a new database with the same field names, only abreviated, and then import the data from my original database into the Access database with the new names.
Is this possible and could someone give me explicit info on how to do it?
Thanks in advance for any help.
View 1 Replies
View Related
Dec 14, 2005
I am using ASP to try to edit the column (field) names of my Access database. Here is an example of would I would like to work:
Code:data_source = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _ Server.MapPath("databases/logins.mdb")Set rs = Server.CreateObject("ADODB.Recordset")rs.CursorType = 2rs.LockType = 3 rs.Open "SELECT * FROM Users;" , data_sourcers(1).name="blah"
The last line is the problem. A field name in an ADO recordset is limited to read-only persmissions for opened (already exisiting) recordsets.
link:http://www.w3schools.com/ado/prop_name.asp
Is there another way around this without using an SQL "ALTER" statement. In other words, by accessing the field's name through a number like rs(i).name instead of rs("fieldname").name?
Thanks.
View 1 Replies
View Related
Feb 9, 2006
Hi, I have an Access database that I would like to do a mass Table Name change. Reason is, all tables start with Data.<table name> so one table is called Data.Names and I would like it to be called just Names. I can manually do this but there are over 600 tables. Would take some time.
Please let me know if there is a script or how I can approach this. Maybe I could loop through each table name where it finds "Data." and strip that part out.
Thanks
Sherriff
View 1 Replies
View Related
Aug 28, 2012
I recieve Excel worksheets with information and then import this information into a table I have in access. I verify the data and as a last step I append the data to a table called AllReportData2012 which is used to pull information for my reports. Part of the Excel information that is imported to a new table includes the employee's name with work details in each row.
In my access report I do not use the employees name, I use their employee ID number. I have a table in my acess database that contains 2 columns. The employees Name and their associated Employee ID number.After I import the Excel information to Access how do I set up a macro or programming that will look at the name in each row and change it to the correct Employee ID. I could have anywhere from 20 rows of recods to 600 rows of records.
View 4 Replies
View Related
Sep 21, 2011
I am using Access 2010. I used a template called calltracker from Microsoft. I have adapted it to my use. Instead of tracking calls it is tracking follow ups. On one form there is a drop down list of reports that came with the template. I have modified the reports structure to fit my needs but in the drop down list they still show the names that came with the template. How can I change the names of the reports that show in the drop down list. How can I add additional reports I created to show in this drop down list
View 9 Replies
View Related
Oct 15, 2005
I have an Application that I want to re-use for a second user. The only change I need to make is to re-name the fields.
Is there a tool that can do this across the tables, queries and reports for each field name change ???
View 1 Replies
View Related
Feb 6, 2007
Hey guys!
I've a database which have some confusing names for its reports and forms. So as I found myself very confused when applying group policy to all the objects I was wondering if there is a way to rename those objects in a way that ALL the references in the hole database for the renamed objects will change too.
E.g.
Form_old_name -> form_new_name
then all the references will change both in the VBA code and in subforms references
I tried doing that mannualy and then using the search & replace tool to update the rewferences in the vba code. Turns out that all the database become a mess and now I have constant "out of memmory" messages
Thank you!
View 2 Replies
View Related
Apr 26, 2005
I need to know how to change the Access variable names programmatically.
I have a large Access database, with hundreds of variables that need to be shortened to 8 characters since they are to be imported into a SIR database, which does not allow variable names longer than 8 characters.
Because the variables have to be unique and yet still identifiable, I have to write code that will do abreviations. For instance:
Neglect Aphasia Conversion Baseline
Neglect Aphasia Conversion Drug
Neglect Aphasia Conversion Fluency
Neglect Aphasia Conversion Composite
will become:
N A CV BA
N A CV DR
N A CV FL
N A CV COM
Would something like this be done in a macro?
And once the variable names are abreviated, how would they be put back in the database table?
View 3 Replies
View Related
Nov 19, 2004
I have a database that I used as a back-end for an Excel spreadsheet. Now that the database has been moved from one place on the network to another, I need to update the information in my spreadsheet to reflect the database's new name and location. Is there any way of doing this short of deleting and recreating the queries in Excel?
View 2 Replies
View Related
Mar 3, 2015
I need to update the names of my ODBC linked tables in my Access database, how can I do this without causing issues with my queries/reports?The current linked tables are to a SQL View on a database called mcsrm_live, and called e.g. vwDamagesReportNew
The new SQL views that I need to link to are identical in structure and content and on the same SQL server but different database - forkdw and are called e.g vw_R_Damages
Is there a straightforward process to do this without affecting the queries and reports in my Access db?
View 2 Replies
View Related
Feb 15, 2015
I have an Access database (.accdb) that has table, form and report. The field in all are the same. The user interacts with the Form only and enters data to it. Table is a back-end thing and no-one goes to it. However, in Form there is a button that when pressed, prints the report for that relevant form/record which we then give to customers.
Now, I have a field in report (like a signature field) that mentions the name of the user who printed that report. Lets say, Mr X did the data entry and then printed the report and gave it to the customer. After that customer loses the report and comes back for a copy of the report, but now Mr Y is at the desk and issues the report. Obviously Mr Y doesn't have to do the data entry again because record is there and Mr Y has the access to it, so he just presses the print report button and prints the report. What I would like is that the signature field should update itself if anyone else (in this case Mr Y) accesses the database and prints the report for that specific record.
View 3 Replies
View Related
Jun 25, 2013
I have disabled the Ribbon using XML code in the USysRibbon table. Everything has worked fine, except that now when I click on two different tabs that exist on my form, the Form Tools Ribbon pops up with options to go to Layout, Design View, etc., and other options, too.
I have two subforms on this tab, but neither one has a Ribbon Name set (I didn't even know how to do that when I made them) where to look to see why this is happening. The Ribbon does not show at all on the other tabs like it is supposed to. It only shows when I click on my 3rd and 4th tabs, and then it disappears again when I click on other tabs.
View 6 Replies
View Related
Aug 2, 2013
I've created a database with multiple subforms within the form; however some of the subforms randomly appear and disappear for no apparent reason.
View 2 Replies
View Related
Dec 8, 2014
I have a textbox & button that when entered & pushed - run a query for the top values randomly depending on the value entered into the textbox.
My code is...
strSQL = "SELECT TOP " & Me.Text140.Value & " [CAN - NAME].Name, [CAN - CPT/VOUCHER].Voucher_Number, " & _
"[CAN - CPT/VOUCHER].Procedure_Code, [CAN - CPT/VOUCHER].Service_Date_From, [CAN - CPT/VOUCHER].Patient_ID, [CAN - CPT/VOUCHER].service_id, Rnd([service_id]) AS RandomNum " & _
"FROM [CAN - CPT/VOUCHER], [CAN - NAME] WHERE [CAN - CPT/VOUCHER].Service_Date_From Between " & Me.StartDate.Value & " And " & Me.EndDate.Value & " ORDER BY Rnd([service_id]) DESC "
It runs like it should but doesn't populate any records...that is until I go into the design view, deselect one of the fields and then reselect the same one - only then does it populate.
Do I need to open the query first and then update/append instead?
View 5 Replies
View Related
Sep 18, 2013
My subforms are randomly adding blank records and one subform I would like to stay blank repopulates with data, though not necessarily the most recently added record. Both of these seem to happen when I navigate to other main records in the database and then return to this page.Using Access 2013, I have a large form with 10 pages. On one of the pages, I have two subforms. This is set up to gather many-to-one data. The top subform is my data entry form with three fields (two combo and a text) and a command button. The bottom subform is a datasheet displaying the three fields.
The two combo boxes are cascading, and they work great. The text box is there to collect additional info for each selection.
The command button works to
1) save the record,
2) requery both subforms in order to display the new data on the datasheet,
3) clear the combo and text boxes, and 4) set focus back to the initial combo box. It all works!
But then when I leave that main record, the horror begins: blank records (from the "many" table) show up on the datasheet and the data entry fields do not stay blank. I suspect my problem is in the command button. I added this code to the OnClick for the command button:
Code:
Private Sub addMinistryItems_Click()
'save record
If Me.Dirty Then Me.Dirty = False
'requery both subforms
Forms![BCD MAIN 2013]!Child572.Form.Requery
Forms![BCD MAIN 2013]!Ministries1.Form.Requery
[code]....
View 1 Replies
View Related
Jun 22, 2005
I have a report that i am trying to list in the header section, a listing of all the names for a particular field, if it is in my report. I will use these names to send the report to.
View 1 Replies
View Related
May 23, 2006
This is probably a simple question, but I can't find the answer and can't seem to be able to format my question into a searchable format, so here goes.
I'm building a report that contains names; prefix, first, last, title. I would like to somehow link these so that instead of a bunch of spaces in between the data, the data is seperated by a single space. I.e. instead of
Mr.........Bob.............Smith............Director
It says:
Mr. Bob Smith, Director
Is this possible?
View 5 Replies
View Related
Apr 1, 2015
I want to populate a table with the database's reports.
And somehow be able to select a row and open a report in design view.
View 4 Replies
View Related
Mar 29, 2008
In my db the look up fields show up as numbers.
for example i have a look up field called "company" and i have two companies in it (Reddot & Thingz).
But on report they come up as 1 and 2 instead of their names.
The db is attached.
21343
If anyone knows the solution, please help me.
Thanks!
View 10 Replies
View Related
May 11, 2013
After changing data source , header and name of report, only the design view tab changes to the new name of the report. i.e. Changed copy of "Fiscal Quarter 01 Report" to "Fiscal Quarter 02 Report". When open in design view, name tag of report is "Fiscal Quarter 02 Report". In any other view, name tag of report is "Fiscal Quarter 01 Report". If I need to have both reports open in report view, they both have "Fiscal Quarter 01 Report" on the name tab - Very Confusing! How do I get all tabs for a renamed report changed to the new name?
View 3 Replies
View Related
May 3, 2006
guys, here is my problem.
I created a tool to manage changes. As part of the process a support can edit a change to change the status and the requester can validate that the change is done properly. Both processes work in the same way, the diference is that the can modify different fields in the form. But here is the procedure.
Edit a task (support role): From a task management menu press the button to open a form with a list of changes to be done. Double clicking in a specific change number a new form with the change detail is opened. When the support finishs press the save button and insert the changes in a history table (to track the changes) and update the change table to update the record. Until this point everything is great.
Validate a task: (requester role): from the task management menu press a button to open a form with a list of changes to be validated. Double clicking in a specific change number a new form with the change detail is opened. When the requester finishs press the save button and save the changes in a history table (to track the changes) and the change table to update the record.
The problem is that the validate task form doesnt update the change table and doesnt insert all the fields in the history table, only some of them.
Here is the error msg:
" ILI index tool can't update all the records in the update query.
ILI index tool did not update 0 fields due to a type conversion failure, 0 records due to the key violations,1 records due to the lock violations, and 0 records due to the violation rule violations.
Do you want to continue running this type of action query anyway?
to ignore the errors and run the query, click yes.
for an explanation of the causes of the violations, click help"
Here are the sql to update and insert once the save button is pressed:
Public Sub grabarstatus()
'DoCmd.SetWarnings False
MsgBox "entered"
DoCmd.RunSQL "insert into [history] (change_id,before,after,user,modify,action) values (" & Me.Task_Num.Value & ",'" & vstatus & "','" & Me.status.Value & "','" & Forms!Login!username1 & "','" & Now() & "','Validate status');"
DoCmd.RunSQL "update [newchange] set status='" & Me.status.Value & "' where change_id=" & Me.Task_Num.Value & ";"
DoCmd.SetWarnings True
End Sub
thx very much
View 3 Replies
View Related
Oct 2, 2005
Not sure if this is possible but I have a few text boxes on a report set to vertical yes under properties. They print fine, but on the pre-printed forms I'm using they print upside down. Is there a way to realign they way the text prints when using the vertical yes setting? I really need they text to be inverted. I'm I asking an impossible question? Thanks..
View 1 Replies
View Related
Jan 3, 2006
I have several reports in my system. Some are landscape and some are portrait. Occasionally the landcape ones switch to portrait taking up two pages each. In preview mode it is not so bad that the user can reset the page size, but when one is sent to print this is most certainly annoying.
Any advice?
View 3 Replies
View Related
Dec 11, 2007
I've asked this question in different forums before, and though some people say it can be done, I have not found anyone who is successful yet.
I have a report that puts down a person's address, however the address information is stored within the database in separate fields ('Address', 'City', 'State', 'ZIP'). The issue I have is with the City/State/ZIP. Some city names are longer than others, is it possible to have the fields adapt to the different word lengths.
Say the address is, Albany, NY 10023. The database would output this alright, but then if the city name is San Francisco, CA 94143, the fields are in disarray.
I have the same issue with names. Last name and first name are stored separately. I would like to display Last, First. My workaround has been to right-align the Last name, and put it adjacent to the left-aligned first name field. This works unless the person's last name is very long, disporportionately from the first name, in which case, it looks very much off center in the overall report.
Any help would be appreciated.
View 5 Replies
View Related