I am using the import code. I need to enter the default directory info and have the user add the rest of the info
My part is up to "exports" (in orange), the rest of the location is entered by the user.
I do know that I can replace the path with an input box, but can I enter default text in the box.
I need some help with the code below. The purpose is to provide the default location and have the user provide the name of the table they want to import.
Code:Function transfer()'Dim pathname As StringDim tablename As Stringtablename = InputBox("Enter the Table Name", , "")On Error GoTo transfer_ErrDoCmd.TransferDatabase acImport, "Microsoft Access", "c: est2007 Royalties.mdb", acTable, ("tablename"), "test", Falsetransfer_Exit: Exit Functiontransfer_Err: MsgBox Error$ Resume transfer_ExitEnd Function
The error message I get is that the object "tablename" can not be found.
I have a search function that returns a list of songs. This function searches by Artist, Title, Album and Genre of music. The search works fine enough. I took the results of this search and put them into a form, from which a user can select one of the songs that have been returned. I have built an append query that automatically tracks each selected item, but it is not working the way that I want it to. I have the append query set that on a double click it will put the records that are selected into two other tables to do the tracking, but instead of taking that individual record, it takes all of the records that are displayed in the result form. how can i have a flexible query that takes the songs that are selected as opposed to the entire list?
I provide a daily report to my warehouse team that pulls information from a data table for the previous day's activities. Since we don't work on the weekends, my statement needs to be manually modified on Mondays to pull the information from Friday and not from Sunday:
WHERE REF_Cal.Date = Date()-1 becomes WHERE REF_Cal.Date = Date()-3
Is there a way that I can write the above statement so that it automatically looks at Friday's numbers [i.e. Date()-3] if today is Monday? In Excel I could write a formula to accomplish this as follows: IF(TEXT(TODAY(),"DDD")="MON",TODAY()-3,TODAY()-1)
Can controls in a form be made flexibly or auto-generated based on parameters set in another form?
Supposed I have a continuous form with 10 textboxes, while at some other time I need to have 12 textboxes or 5 textboxes only. Total textboxes needed would be set from another form. The maximum number of textboxes should be unlimited. Is it possible?
The backend table actually can be created flexibly using SQL based commands. And to link the fields to the textboxes is another problem.
I need to create a field in an input form that is simply the concatenation of two other text fields. I have tried all sorts of things, but when I look at the data in the table that field.
I have a field called ID that I want to be created like this:
=Format([UniqueID],"00000") & "-" & [Mosque]
This works well in my output fields, but does not work the same way on the input form. It needs to be based on the currently input values from the current record. Anyone have any ideas?
I need to be able to query the service dates for the bill. So I can query 1509 for the .billYYMM and .readdate and it will give me the TO Date. How do I in the same query tell the query to subtract 1 from the BillYYMM that I just entered and give me the read date for that field in that query? So Query 1 MBRHISTDETL.BILLMOYR and in the criteria box use [Enter the Bill Month Year YYMM you want to search for] will allow me to run the query at any time for any bill month year that I enter. So another field in that query is MBRHISTDETL.READDATE. So to get the FROM date and the TO date i need the following MRBHISTDETL.BILLMOYR (whatever I enter as input) and MBRHISTDETL.READDATE that corresponds and then I need [MRBHISTDETL.BILLMOYR]-1 and MBRHISTDETL.READDATE. The first gives me the TO date and the 2nd gives me the FROM date?
i hvae a situvation that i hvae to take password from the user for that i am using inputbox option to take password. the problem is if i use input box we can't mask the input text box as far i know. so do we hvae any other option without creating another form for that.
I want to use input mask in my email field i.e the @ must be present but i must be allowed to input values or numbers before and after the @. This did not worked because i have fixed the values: ????@???? thanks
I am trying to uses a inputbox. I need it to end the script if cancel is hit, but the value from the input box can be zero? So cant filter it that way.
Also
Does the SQL command LIMIT work in access and is it possible to number row in order?
Hey all, I am currently looking to make a great database system for use within my community. What I currently have is a mdb with just 3 tbls but will be building from there. I have the normalization down thus far, but wanted to put things out there for any suggestions or ideas to make this a useful system. This is not a profit situation, and will generally be used only by myself or possibly one or two others.
What I have is a database that tracks the homeowners within our community (subdivision) and their properties. So far I have 3 tbls
Structurally this works great so far. I can easily relate properties to their owners and link multiple properties to those who own more than 1 (landlords). I structured it this way since the two tbls had many to many relationships, so the junction tbl made the most sense. Now I am looking to add information from a tract search (mortgage holder information) which technically relates to both of these tbls (Unit & Owner) as well. I already know that most of the owners with multiple properties will most likely have the same mortgage holder, but that is not definitive. Since the same mortgage holder could easily be associated to multiple properties within the community, I know I have to have an independent tbl for that information as well. What I would like to head for is something that will allow me to send notifications, letters, flyers and the likes to either the owners, residents, mortgage holders, or any combination of the three. I have attempted to create a few thus far but have issues with getting all of the required data output to Word, so I am thinking I may need to design these items in a Form instead.
Any thoughts or comments would be appreciated. I know I am heading in the right direction, but just putting it out here for the Access community to put in their 2 cents.
Dear fellow forum members have been trawling the forum but unable to solve what seems a simple issue.Have a form with a field for a short date input.I would like the year to be input automatically and the user to be left to input day and month.Have played around with format(date(),mm-yy) but unable to crack it.If someone can save me another sleepless night I would be more than grateful.
let's say i have a field, in which i store and identity card number. This number may consist up to 7 digits (of which 3 are mandatory) plus 1 letter (mandatory) at the end. Thus a valid identity card number may be the following: 1234567M, 123M
Eventually, since the field must always contain a letter, i set the data type to Text with field size of 8 ... and i set the inout mask as follows:
9999000L (since the first 4 digits are mandatory). With this input mask, if i have an ID Number of 123M, i have to input it as 0000123M.
Although, I would like to have the leading zeros, is it possible that during data entry time, i would simply type 123M, and i will get the zeros automatically, after the field loses the focus, rather than having to type them myself ?
I want to force user to input state in capital letters, ie; CA, CO, WA, etc., with two text characters only. Working in design view, I used this character: > in the input mask field property area, which I understand (perhaps mistakenly) will convert characters to uppercase. Now, I cannot enter any info in the state field. Any help would be most appreciated.
I posted on this forum a few months ago chasing a solution and still haven't found something. Is ther any way in vb that you can prompt the user to input a number? I was posted the code below to try and help. In the example below, i would like to be able to have the end user input the first and last numbers (11000 and 11100, in the example) in a pop up box, as these vary, not have them defined in the code, is this possible? In the database, the first and last numbers in a string are all that is needed and the db fills in the gaps, so to speak
Const MyTable As String = "YourTableName" Const MyField As String = "YourFieldName" Dim db As DAO.Database Dim rs As DAO.Recordset Dim intCounter As Integer Set db = CurrentDb Set rs = db.OpenRecordset(MyTable) For intCounter = 11000 To 11100 rs.AddNew rs.Fields(MyField) = "TP" & intCounter rs.Update Next intCounter rs.Close db.Close Set rs = Nothing Set db = Nothing
Thanks for any help you can give. I hope it is pretty straight forward, as my vba skills are fairly limited.
I'm creating a database based on an Excel file. The Excel file has about 180 columns and are only linked by to distinct fields. Is there any possible way that I can break this down into easier to manage tables? There are different categories of columns such as
Financial Info Personal Details Products Requirements
I'm not too sure how to link these categories other than the two distinct fields I've mentioned and I know it's not a good idea to have 5 tables with identical primary keys across all 5. Can anyone offer some input?
I am trying to create an input mask for a name field. I have Spanish names with two last names separated by a hyphen, a comma after the two last names, a space, and then the First Name a space and the Middle Name. The First Last Name needs to be in all capitals like the example. Example: NARANJO-Ramirez, Jose Luis
Can someone please help me format this mask. One trick is that there aren't always middle names. Since all parts of the name are different lenghts for everybody, I need to have an optional number of characters for each of the four parts of the name.
I’m reading “Selecting the Data” from Running Microsoft Access 2000, pp. 87-94. The confusing part is the input/output explanation. When I think of input I think of typing, keying, or entering raw data into the computer. Output to me is information displayed or printed.
Okay, here is what was printed:
“A data item is an input for a task if you need to read it from the database (but not update it) to perform the task. For example, a customer name and address are some of the inputs needed to create an order. Likewise, data is an output for a task if it is new data that you enter as you perform the task or that the task calculates and stores based on the input data. For example, the quantities of items you enter for an order are outputs; the shipping address and phone number you provide for a new order are outputs as well.”
The above is confusing me. Can anyone explain it better so this dummy can get it? Thanks!
[Enter oner1, such as m20] Or [Enter oner2, such as m20] Or [Enter oner3, such as m20] Or [Enter oner4, such as m20]
Basically, it pops up one window after another as you input your info.' Then after the four pop ups it will go and retrieve the needed information. It works great for me....
Is there a way for me to take this query script and if I leave one pop up blank it would just go and find what I put in without having to press "enter" for the additional inputs that I did not want... It's a pain when I increase this to 10 pop ups and one need one...
Example :
Lets say I only want to input two and then go find the information. right now I have to continue closing the pop ups until I have cycled through all four and then it will go. I want to eliminate the additional ones.
I'm not a genius at this so please make it as easy as you can if you have any ideas....