Worked like a charm!!!
Thanks Colintis!
User Profile
Collapse
-
Derive Field Based on 2 other fields
I have a form where I want a third field to be autofilled by a certain text based on the content of 2 previously entered fields of data.
I put this following code into an on_click event of a button. (I dont care much on how it happens, I only want it to fill)
But the problem is that...Code:If (Me.DepCity = HAM & Me.DestCity = PEK) Then Me.DepHandlingAgent = "DSVHAM" End If -
Thanks Jim. Sorry, I thought it might be easier for someone to understand the problem if they knew the background to it. Lesson learnt for next time :)
thanks again!Leave a comment:
-
Thanks!
IU am trying that, and it seems promising, but i have another issue now:
My DB has 3 tables T1, T2 and T3. and the relationships are as follows:
T1.primaryKey = T2. forignKey
T2.primaryKey = T3. forignKey
But T2's PK is an autonumber that MS access generates, and this automumber is generated only when a record is created in the DB. So if i were to append the records that i extracted from the xls...Leave a comment:
-
imported selected fields to table from xls file
Hey guys,
I have a .xls file. Lets call it "MyExcel.xl s". And I have a .mdb called "MyDB.mdb" and there's tw tables 't1' and 't2'.
I want to import some selected fields of Myexcel.xls into 't1' and 't2'. t1!=t2.
and t1 and t2 have a particular coloumn order that i need to follow and myxls is also of a fixed unchangable column order.
All tips appriciated! -
Hi,
I tried "CurrentProject .Path" but it didnt work.
Basically the excel files should be exported to a subflder within the folder in which the database is.
Eg:
Database is in D:\Database\v10 0
Tables should goto D:\Database\v10 0\exported
But I get an error saying the path is not valid. (but all the folders are created and paths are corrects)
basically I said the destination...Leave a comment:
-
Setting path of TransferDatabase Macro
Hi,
I have a database saved in ""D:\Database\v 101" and some macros that import/export (transferSpread sheet) the tables of it. These tables (approx 30 tables) are saved in a location "D:\Database\v1 01\tables".
After going through it with the user and I need to update it I create a new version and save that in "D:\Database\v1 02". Now the tables I export\import from the DB are should be saved... -
Concatnate records
Hey Guys,
I have a DB with multiple records. (lets take a teacher student example)
Teacher (Tcode, Tname, Taddress)
Student (Scode, Sname, Sgrade)
I want to run a query that will give me
The result such as
QueryResult (TCode, Listof(Sname), Max(Sgrade))
The should be something like this:
ListOf(Sname) = john, sam, jenny, ann
Comam separated list of names... -
I tried the acode above..But i get a runtime-error (3270)...
aparentlythe bug is in this this line.
Code:db.Properties(strPropName) = varPropValue
Leave a comment:
-
I'm now tring the 'sendObject' macro. It neatly opens outlook and attaches the file. to the email. But if It cant send more than one file attached in a single email. If i add 2 actions to attach two files, it opens 2 separate emails with the respective files...
Maybe there's a way for me to refine this method instead?Leave a comment:
-
hey delerna,
its still very much the same. Its just that the button doesnt start outlook (or send the mail to the "outbox")
:(Leave a comment:
-
Hiding Design View from users
Hi,
I am making a database amd i dont want users seeing the stuff thats happening in the background. So i would like to hide everything so that ONLY I can see it. Doing some reading online (and asking friends) I learnt of a few things i can do:
1- right now i have hidden the design view using tools->startup (and unchecking all boxes). But if someone knows a bit of access they can get into the design view by using SHIFT+open.... -
it hasnt eached the recipient> not even the outbox of the sender(me).
The exact code i tried out.
...Code:Private Sub email1_Click() Dim OlApp As Outlook.Application, oMail As MailItem Set OlApp = CreateObject("Outlook.Application") Set oMail = OlApp.CreateItem(olMailItem) oMail.to = "dileshXXX@hotmail.com" oMail.Subject = "test Auto email"Leave a comment:
-
I just tried it, but I click the button but nothing happen.
Also i want to attach multiple .xls files. (when i tri doing this through a macro, it creates individual emails for each attachment)Leave a comment:
-
Thanks Delerna,
I got the exporting part working, but its more the emailing than I want to get figured out.
Right now I have a macro that exports the tables into respective .xls files (or even one single .xls file). But the problem with the single .xls file is that importing the multiple tables from it is srewed up. and its too late to change the architecture of the DB since all the forms querries etc have been created out of the ...Leave a comment:
-
I dont know if i'm asking too much fo you guys (and MS office), but is it possible to maybe send ONLY the newer portion of the database into the .xls sheet?
I mean say its a continuously growing database.. I want to send ONLY the records that i inserted/modified today, rather than send everything.
I dont have a timestamp or anything to give a sense of time on the editing, but the only way i can think of is for access/excel to manually...Leave a comment:
-
Code/macro to email all tables in DB?
Is there a way that i can (with the simple click of a button) export all the tables in a access database into a single .xls file and attach it to an email (in outlook)?
It feels far fetched, but since its all withing MS office was wondering if it was possible)
Thanks! -
Import/Export access tables to xls file
hey guys,
I have a access (2000 format) database. I want to be able to export all the tables in it onto a single .xls file and import it from an identical .xls file (for example if i email the tables ONLY to another person who has the same Db structure, he should be able to cleanly import the tables and see the data on his DB). I can currently do 2 things.
1- export all tables into one .xls file using
...Code:strFullPath = "D:\Database\ALL_DATA.xls"
-
Thanks guys!!!
It worked...the "times" were formatted as date/time... did some minor *24 etc manipulations to get the result int he desired output... the main problem i had was in the double IF conditions :)
Thanks again!!!Leave a comment:
-
double if condition in MS access query
hey guys,
I want to do some mathwork in a MS access query. But i tried a couple of syntax to get this to work but i can quite get my condition translated for a MS access querry Can someone tell me how i get get two IF conditions into the query.
My psudo-code is as follows...Code:iF (Priority='AOG') if (Service = 'D2D') timeA = time2-time1 else timeA = time3-time1 else if (Service =
No activity results to display
Show More
Leave a comment: