ms access 2010 - Adding / Subtracting Two Fields in Query Criteria -


I have a table that contains suburbs and their geocodes.

I have a query that selects a suburb from the form, together with +0.5 and -0.5 long and all other suburbs within latitude.

Criteria in the query, respectively for Long and Wide Area;

Between [forms]! [Long] -0.5 and [form]! [FMFIMMetting Locations]! [Long] +0.5

middle [form]! [FMFIMAttinging Leases]! [Late] -0.5 and [form]! [FrmFindMeetingLocations]! [Lot] +0.5

It works perfectly. What I am trying to do, statically changes the '0.5' in the context of the combo box on the form (by giving the option of 0.01, 0.05, 0.5 etc.) I have tried below and various other combinations, etc., but it does not seem to work.

] [frmFindMeetingLocations]! [Late] - [form]! [FrmFindMeetingLocations] [cmbSubDistance] and [form]! [FrmFindMeetingLocations]! [Late] + [form]! [FrmFindMeetingLocations]! [CmbSubDistance] to

I put a text box and refers combo, and value have been added so that way I have two references that seem to recover and I am decreasing, can something happen with that?

On another note, I am clearly using a simple method of finding nearby suburbs. I know that latitude is quite stable for the distance, but varies for a long time - this is only for Victoria Australia, can there be any harm to do so?

It was fixed! All this came down to fill the second statement (which refers to the distance - '0.5') with the val function Done. I'm also not sure why this work is complete, but it does.

so now looks My SQL;

  SELECT tblStatePostCodeLongLat.Suburb, tblStatePostCodeLongLat. StateCode, tblStatePostCodeLongLat.Long, TblStatePostCodeLongLat.Lat, tblStatePostCodeLongLat.Accuracy from tblStatePostCodeLongLatWhere ((tblStatePostCodeLongLat.StateCode) = "VIC") and ((tblStatePostCodeLongLat.Long) ([form]! [FrmFindMeetingLocations]! [ Long] Wall-([Form]! [FrmFindMeetingLocations]! [TxtNearSubDistance]) and ([Form]! [FrmFindMeetingLocations]! [Long] + Val ([forms]! [FrmFindMeetingLocations]! [TxtNearSubDistance])) and ((TblStatePostCodeLongLat between KLat) ([form] [LAD] + Val ([forms]! [FrmFindMeetingLocations] [Lais] Wall-([form]! [Fmfaimaftimiting locations] [Tistianaiarsaibeeditins]) and [[forms]! [FMF & Mitting] TxtNearSubDistance])))) by order tblStatePostCodeLongLat.Suburb;  

Thank God for this - I was going missing! Hope that solution helps anyone.

Cheers

Red


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -